This project has moved and is read-only. For the latest updates, please go here.

Fixing the rotation of an object

May 14, 2009 at 8:11 PM
Edited May 14, 2009 at 8:16 PM

how do i limit the rotation of an object.


thx for your help

May 14, 2009 at 8:13 PM

You can set the moment of inertia on the body to float.MaxValue or use an AngleLimitJoint with a max angle of 0 and min value of 0.

May 14, 2009 at 8:16 PM

thats great thank you for the fast reply and greate service.

May 14, 2009 at 8:18 PM

yes, by using Fixed Angle Joint,

Fixed Angle Joint Factory
1.  CreateFixedAngleJoint(PhysicsSimulator physicsSimulator, Body body)

and set TargetAngle property to the angel you wish in radians, you cam change it on running time also.