- Home /
Question by
paulcmnt · Jul 11, 2012 at 01:48 PM ·
rotationrigidbodyconstraint
Unlock rotation from script
I have a game object whose Rigidbody
has rotation fixed on all axes. Is there any way for m to programmatically unlock rotation on these axes at a certain point in the game?
Comment
Best Answer
Answer by whydoidoit · Jul 11, 2012 at 02:05 PM
You need to modify the rigidbody constraints to remove the flags for freezing the individual axis rotations.
rigidbody.constraints = RigidbodyConstraints.None;
Removes all of them.