[ODE] Object speed
Alexandre Ribeiro de Sá
alex_r at vortexentertainment.com
Sat Nov 27 01:45:47 MST 2004
AHOY!
I have a small question, how can I get the speed from a object?
I made this test... but... I don't know... the result is too... -_-'...
hehehehe
if( BodyPos.posX < 0 ) BodyPos.posX * -1;
if( BodyPos.posY < 0 ) BodyPos.posY * -1;
if( BodyPos.posZ < 0 ) BodyPos.posZ * -1;
Speed = ((BodyPos.posX + BodyPos.posY + BodyPos.posZ)/3 - OldPos);
OldPos = (( BodyPos.posX) + ( BodyPos.posY) + ( BodyPos.posZ)) / 3;
Thx
Alexandre Ribeiro de Sá
More information about the ODE
mailing list