Detect collision with shape inside compound shape

TrolleFar
Posts: 1
Joined: Fri Feb 06, 2009 9:30 am

Detect collision with shape inside compound shape

Post by TrolleFar »

Hi, we are using bullet in a physics puzzle game and we have a little problem with compound shapes.

The player controls a little ship that is constructed by different modules, each with their own collision shape. These modules is combined in a compound shape.
When the ship collides with objects in the world we want to know which module that is involved in the collision and apply damage to it.

By using the collision callbacks we can identify when the ship (the whole compound shape) collides with other objects. But we can not figure out how to get information about which part of the compound shape that collided.
Is it even possible to do this or should we use another technique? We did some early tests with multiple rigid bodies connected with constraints but the construction became too unstable so that is not an option.

Thanks in advance