[ODE] rolling ball

Vianney Lecroart acemtp at gmail.com
Fri Jul 1 09:07:01 MST 2005


Hello guys,

I have a ball rolling on a floor (a big box). I can control it with
arrow keys. When I press the up key, the ball accelerates. I use
dBodyAddForce() to do that. I want that the ball, when the guy keep
the up key down, is rolling at a maximum velocity (for example 50km/h)
but since I use a add force, the ball always accelerate. The problem
is that I cannot control the velocity and I cannot clamp it because,
in the ode doc, they said it s bad to setup manually the velocity, and
it can generate bad behaviors. They also say that we should use a
AMotor joint to control the velocity but in my case, I have only one
body (the ball) and the AMotor requires 2 body.

What is the best way to resolve this problem?

Regards,
Vianney Lecroart



More information about the ODE mailing list