- Home /
Rigidbody Constraints vs MoveRotation
Hi,
Why doesn't :
rigidbody.MoveRotation(Quaternion.Euler(Vector3.up move Speed Time.deltaTime);
...fix the x and z rotations to zero?
The above line of code is running in FixedUpdate().
Expected behaviour: I am expecting it to maintain the rotations of my capsule in both the x and z axes at zero. Perceived behaviour: as expected, until there is a collision with an object, at which time x and z axes rotation is seen, and remain without being reset to zero.
I can fix the problem by applying constraints on the Rigidbody component manually, but I don't understand why I need to?
Cheers, A
Your answer
Follow this Question
Related Questions
Player model Rigidbody keeps falling upsidedown 0 Answers
Is it possible to constrain an object's rotation in worldspace? 2 Answers
Rigidbody constraints not working with parent/child relationship 2 Answers
How does one constrain rotations of a CharacterController without a Rigidbody? 0 Answers
Unfreeze Rigidbody ROTATION only 1 Answer