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

Constant Rotation of bodies

Topics: Developer Forum, User Forum
Sep 1, 2009 at 6:52 PM


I've got an object i want to apply a constant rotation to.  I was wondering which way would be the best bet, either to make the object static and just increment the rotation e.g.


_body.Rotation += rotationSpeed;

With this way i'm getting inaccuracys with collisions.

The other way would be to apply torque to the body but this makes the rotation speed up over time, is there a better way of implementing this?

Hope i'm making myself clear.


Sep 1, 2009 at 7:15 PM

Robertdodd ported over the revolute joint from physics2d that has a motor functionality. You can download it here:

It should do exactly what you need.

Sep 2, 2009 at 12:56 AM

What would happen if you set the body's moment of inertia to positive infinity, and then set the angular velocity directly? I dont have Visual Studio open right now, but it seems to me that this should make it roate at the speed you want indefinitely.

Sep 2, 2009 at 1:32 AM


Thanks for the quick reply, i've implemented your suggestion and works almost how i want it to.  Except if an object hits the FixedRevoluteJoint it still affects the rotation of the object. I want it to be completely rigid if this is possible. Anything i might have over looked?



I'll attempt at implementing your suggestion if genbox's doesn't work for me.  Thanks for your help.