[ODE] ? about dAddBodyForce

David Walters hidden.asbestos at googlemail.com
Mon Aug 21 14:42:08 MST 2006

> When I press the forward key in my application I call dBodyAddForce and add
> 100 to the forward direction.  But as I hold down the forward key, my speed
> seems to keep increasing forever.  How do I set a maximum speed?

Hi, I think what is probably the best way to solve this is to simply
check the body's current velocity and if it's magnitude is greater or
equal to your maximum allowed, then don't apply the force. Newton's
first law says that your body will then proceed at that velocity until
another force is applied (either friction or some manual force to
simulate rolling friction or drag) to alter it.

I hope this helps.

More information about the ODE mailing list