[ODE] 2 question
Roel van Dijk
roelvandijk at home.nl
Sat Jan 31 20:12:59 MST 2004
On Friday 30 January 2004 18:57, Alexandre Ribeiro de Sá wrote:
> AHOY!
>
> I have some trouble here in my racer game...
>
> 1- How I set the acceleration?
> 2- How I ger the actual speedy?
You 'set' the acceleration by adding forces to bodies:
void dBodyAddForce (dBodyID, dReal fx, dReal fy, dReal fz);
See also the related functions:
http://opende.sourceforge.net/ode-latest-userguide.html#ref40
Or if you use motors (which is more likely in a racer game) you can use the
dParamFMax to control the power of the motor and dParamVel to set the
velocity.
See also: http://opende.sourceforge.net/ode-latest-userguide.html#ref40
You can get the linear speed with
const dReal * dBodyGetLinearVel (dBodyID);
More information about the ODE
mailing list