[ODE] Object speed

Geoff Carlton gcarlton at iinet.net.au
Sat Nov 27 18:55:01 MST 2004


Why not just use the proper equation:
    v = dBodyGetLinearVelocity(body);
    speed = sqrt(v[0]*v[0] + v[1]*v[1] + v[2]*v[2]);

If the sqrt is too slow then you could consider using the squared speed, 
or else a fast sqrt approximation function.

Geoff



More information about the ODE mailing list