[ODE] ode and sound effects

Jon Watte hplus-ode at mindcontrol.org
Tue Jan 13 14:17:37 MST 2004

Just get the relative speed of the two bodies colliding.

Something like this:

Vec3 velA, velB;
dBodyID bodyA = dGeomGetBody( bodyA );
dBodyID bodyB = dGeomGetBody( bodyB );
dBodyGetLienarVel( bodyA, velA );
dBodyGetLinearVel( bodyB, velB );
velA -= velB;
float relativeSpeed = sqrtf( velA.LengthSquared() );


			/ h+

-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org]On Behalf Of Luca
Sent: Tuesday, January 13, 2004 8:33 AM
To: ode at q12.org
Subject: [ODE] ode and sound effects

Hi Super Boies,
i'm using this fantastic library to develop a realistic simulation so i want
to play sound when two or more bodies collide.
to do that i need the speed of a contact point inside the nearCallback
function of a specific rigid body.
Have someone this function and can you share it with us?
thank you very much

More information about the ODE mailing list