Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why i can't see Fixed Angle option in Rigidbody2D in the new Unity5?

Tags:

unity3d

That's it, i can't see the option in the inspector. I saw it in the old Unity4 but i can't do it now in unity 5. Also, it is in the 5.10 version. Please help me, i'm newbie haha.

like image 834
Yowow Avatar asked Jun 12 '15 03:06

Yowow


1 Answers

In Unity 5.1, the fixed angle effect is done via Rigidbody2D.constraints.

GetComponent<Rigidbody2D>().constraints = RigidbodyConstraints2D.FreezeRotation;

Constraints

See also RigidbodyConstraints2D.

like image 188
Chris McFarland Avatar answered Nov 10 '22 00:11

Chris McFarland