- Home /
Parenting the Character Controller to rigidbody: won't stick
Hello!
I'm trying to make the character controller ride a rigidbody snow sled. Problem is, once I make the rigidbody the parent, the character controller starts sliding around on its own. And once the sled goes over any small bump, the character controller starts levitating upward - still a child of the rigidbody.
How do I parent the character controller to this rigidbody, and COMPLETELY disable all of its own movement?
Without pressing any keys, the character controller slides off of the sled on its own.
Unless you mean I should just disable the character motor script?
the character motor script still applies gravity sliding, so yea, you can disable it if thats how you are moving it.
Yay! Thank you.
Character$$anonymous$$otor charScript = player.gameObject.GetComponent<Character$$anonymous$$otor>();
charScript.enabled = false;
That did it.
Answer by Benproductions1 · Jul 23, 2013 at 02:58 AM
Hello,
Disable whatever is moving it,
Whether that is the standard asset's CharacterMotor or your own script
it doesn't make a difference :)
Hope that helps,
Benproductions1
It's weird that you're answering twice.
"Disable whatever is moving it" doesn't really help me, because my problem was that I didn't know what was moving it.
I still don't actually know what was moving the CC, but I now know that disabling the character motor script fixes the problem.
From the question you have not suplied in any way shape or form anything about the rest of your setup.
That is as detailed an answer as is possible from the question.
I have not answered twice. I found your problem and posted it as an answer so that it could be accepted to help anyone else having the same problem.
if I answered the question though, you should accept my answer :)
Well, you didn't suggest to disable the Character $$anonymous$$otor. If you had said that, I would definitely consider your response to be the answer.
Oh well, I'll do it anyway. Anyone reading this will get all the info they need.
Your answer
![](https://koobas.hobune.stream/wayback/20220613110646im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Guidelines for using rigidbody, collider, CharacterControllerScript, etc? 3 Answers
Character Controller meets Rigidbody 1 Answer
Unity 4.3 CharacterController collision with physics 2D not working 1 Answer
Attaching Rigidbody breaks gravity 1 Answer
How can I make rigidbodies react cleanly to the character collider? 1 Answer