- Home /
Rigid Character always falls (Physics) (No Root Motion)
Hi Guys,
I have here a tiny little problem which drives me crazy. I wanna animate my char using No Root Motion because it makes my life easier.
I use this command to move the char the way he/she is looking at
if (GUI.RepeatButton(new Rect(525, Screen.height - 150, 100, 50), "Forward") ){
transform.position += transform.forward * Time.deltaTime * 5f;
}
My Problem is: When the Box Collider is too small, my character always falls when I move her. Using the Capsule Collider makes it even worse.
If the box collider is too large I cannot walk through narrow paths.
SO any idea, how to solve this newbie problem?
And no, I cannot turn off the Physics and I dont want to switch to Root Motion.
thank you guys
Answer by mwbranna · Oct 17, 2014 at 10:12 PM
In the rigidbody, set the "Freeze rotation" constraints on X and Z. This will allow the rigidbody to turn but not fall over.
Unity reference manual for rigidbody showing where to check the boxes
After few more tries the solution was to check the 'Freeze Rozation X Y Z' in the 'Rigidbody'.