Callback questions

Coderro
Posts: 7
Joined: Fri Jan 21, 2011 4:25 am

Callback questions

Post by Coderro »

I'm developing a game and have recently switched to using Bullet for it from another physics engine. So I already had filtering and custom collision response set up the way I wanted, and now need to figure out how to use Bullet's tools to use to reimplement them. I've hit two problems in doing so:

First, when using a broadphase collision callback to filter collision, the given btBroadphaseProxy arguments sometimes reference a btCollisionObject I never created. This seems to occur in collisions with a btBvhTriangleMeshShape object. Is this expected behavior, and if so how can I retrieve the correct collision object or at least the correct user data for it? Note that the nearphase callback is behaving properly.

Secondly, in the case of an object bouncing off of another object, I've had the ContactProcessedCallback get called without the ContactAddedCallback being called. Also curious if this is intended.

While I'm asking questions, is there any benefit to using nearphase filtering over broadphase filtering, and is it possible to set a concave triangle mesh to have one-sided triangles, and if not how hard would it be to implement?