Page 1 of 1

Locking Angular movement

Posted: Mon Jan 22, 2018 9:39 pm
by angrynerd
I'm trying to lock the angular movement of a body to zero degrees so it's situated point straight up. At the beginning of each frame I set the angular velocity to zero and set the angle to zero after the world update. I've also tried setting the angle to zero before world update and both. No matter what I try when my body collides with something it still turn a little. It will straighten back up after the collision is over and the momentum is lost.

Is there a way to lock the angle permanently ?

Re: Locking Angular movement

Posted: Wed Jan 24, 2018 10:00 pm
by William
You should be able to set the mass of the body to FIXED_ANGULAR_VELOCITY. This means that the angular velocity cannot change from whatever it is set to.