[ODE] Easy Newbie Question

coberr at scottsdaleins.com coberr at scottsdaleins.com
Wed Jan 28 15:38:54 MST 2004


I have just started using ODE a little bit ago - and I think it is
fantastic!

However, I have a simple question:

In my application, I want to play a sound when two objects collide.  In
this case, there are shapes bouncing on a plane.

Initially,  I have tried to play a sound everytime there is a collision.
Specifically, I play a sound if dCollide() returns any contact points at
all.  dCollide() is called from a callback registered with dSpaceCollide().

The problem is that the sound is being played much too frequently -
obviously many contact points are created within any given small timeframe.

The solution I am considering is to only play a sound if there is a
collision AND a certain amount of time has elapsed.

My question is whether this is the best approach.

Thanks in advance for any insight or advice
Bob




More information about the ODE mailing list