Lax
23-05-2009 10:02:21
Hallo all,
I have the following problem:
When an enemy shoots an bullet and the bullet hits any body, then I need to play a sound and the bullet shall disappear. I have several types of Bodies like houses, trees, cases etc.
The long-winded way would be: set material pairs with bullet and houses, bullet and trees, bullet and cases. Then create the contactcallback(including userbegin, process etc) for each pair.
Now my question is: Is there a way to call one contactcallback, regardless of which body is collided with the bullet, so that I can play the sound and let the bullet dissapear.
thanks in advance.
I have the following problem:
When an enemy shoots an bullet and the bullet hits any body, then I need to play a sound and the bullet shall disappear. I have several types of Bodies like houses, trees, cases etc.
The long-winded way would be: set material pairs with bullet and houses, bullet and trees, bullet and cases. Then create the contactcallback(including userbegin, process etc) for each pair.
Now my question is: Is there a way to call one contactcallback, regardless of which body is collided with the bullet, so that I can play the sound and let the bullet dissapear.
thanks in advance.