I'm a big newbie in Bullet Physics and I'm having big troubles with the Collision thing. Sorry in advance, since it is probably something largely discussed but I didn't get a clear response from my past research.
From the docs:
Filtering collisions using masks
Bullet supports bitwise masks as a way of deciding whether or not things should collide with other
things, or receive collisions.
For example, in a spaceship game, you could have your spaceships ignore collisions with other
spaceships [the spaceships would just fly through each other], but always collide with walls [the
spaceships always bounce off walls].
Your spaceship needs a callback when it collides with a wall [for example, to produce a “plink”
sound], but the walls do nothing when you collide with them so they do not need to receive callbacks.
A third type of object, “powerup”, collides with walls and spaceships. Spaceships do not receive
collisions from them, since we don't want the trajectory of the spaceship changed by collecting a
powerup. The powerup object modifies the spaceship from its own collision callback.
The text suggest that you have a collision callback available with masks. But after a lot of search (forums, doxygen, ...) and looking at the demos I did'nt find any callback in the meaning of "have a function which is called when this object is collided". The CollisionInterface demo uses the big loop with manifolds.
The only thing I could conclude is that there's actually no callback available, except the global ones which work with all objects and at early stage.
So my question is: do we have a callback at object level, or do we definitively have to process all pairs in a loop and try to use techniques to filter as much as possible (like ghost objects) ? Knowing this would help me much, since I can focus on this, instead of trying to find out this mysterious callback thing.
Thanks !
EDIT/
After further crawling in ye-old archives, it seems that I eventually need to process the loop, it ought to be the only way ... Maybe I didn't understand the concept of bullet callback, it must mean "the object reacts" here.