- Home /
Unfreeze Rigidbody ROTATION only
Okay, so in my script at a point i freeze the X Y Z rotation of the rigidbody by pressing a key. Then i press another key to freeze the X Y Z position. Now i want to unfreeze JUST THE ROTATION. However if i set rigidbody.constraints = RigidbodyConstraints.FreezeNone; it removes ALL constraints including position. But i want it to remove just the rotation. How can i do this? Please help thank you
Answer by Eric5h5 · Jul 14, 2013 at 12:24 AM
rigidbody.contraints = RigidbodyConstraints.FreezePosition;
But then how do i remove only rotation or only position? !FreezePosition?
Setting FreezePosition means the rotations are not frozen.
I dont think you understand. I have rotation and position frozen how can I UN-FREEZE the rotation only!?
I already answered that. If you have the rotation and position frozen, then rigidbody.contraints = RigidbodyConstraints.FreezePosition
will unfreeze the rotation.
oh thank you it just confused me because it said FreezePosition.... i dont understand how that works though?