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 ?
Locking Angular movement
Re: Locking Angular movement
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.
William
William
Return to “General Discussion”
Who is online
Users browsing this forum: No registered users and 1 guest