[ODE] rolling ball

Anton Savin anton at targem.ru
Fri Jul 1 14:04:07 MST 2005


Just don't apply acceleration force to a ball if it's velocity is
greater than maximum.

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

VL> What is the best way to resolve this problem?


-- 
Cheers,
Anton Savin



More information about the ODE mailing list