I’m using a physics engine (cannon) and I would like to generate a sound if 2 objects collide.
There I ran into 2 problems:
I would like get a notification if any collision happens. Either any collision of any object with any other object (PhysicsImposter). Or, any collision with one specific PhysicsImposter.
I have found only OnCollideEvent but that is deprecated. The other collision events seem to require to register certain objects beforehand.
I would like to know with which force/impulse the 2 objects collided. I would like to use this to control the volume of the played sound.