Locking Angular movement

Posts that don't fit into other categories.
angrynerd
Posts: 4
Joined: Thu Dec 07, 2017 11:11 am

Locking Angular movement

Postby angrynerd » Mon Jan 22, 2018 9:39 pm

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 ?

William
Site Admin
Posts: 378
Joined: Sat Feb 06, 2010 10:23 pm

Re: Locking Angular movement

Postby William » Wed Jan 24, 2018 10:00 pm

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


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest