how to identify hit shape/part

Nox_firegalaxy
Posts: 1
Joined: Sat Dec 10, 2011 5:18 pm

how to identify hit shape/part

Post by Nox_firegalaxy »

Hi,

I have a big massless but not static object composed of multiple parts. One way would be to define multiple bodys and constrain them but im not sure what bullet will do if I set a velocity to one of the bodys. So I decided to try to use one body with multiple shapes.
For "simple" shapes I can get the hit shape by requesting the m_index0/m_index1 value of btManifoldResult (which is already strange enough because the hit shape/part should be specified by m_partId0/m_partId1 and not by the index). But my parts are concave so I have to use btTriangleIndexVertexArray. For them m_partId0/m_partId1 is -1. Furthermore m_index0/m_index1 is the triangle index BUT the index is independent of the shape it belongs to. So i see no way to get an shape index.
To make it worse a collision of a trianglemesh and a hull only give the triangleindex for the trianglemesh but "vanish" the index of the hull.

Is it even possible to distinguish between different hitzones/part by using multiple (trianglemesh) shapes? What is the "way to do it right"? Why are the part/indices "messed up"?