btBvhTriangleMeshShape + Collisions (lack of)

LaceySnr
Posts: 11
Joined: Fri Mar 20, 2009 11:11 am

btBvhTriangleMeshShape + Collisions (lack of)

Post by LaceySnr »

Hi,

I played about and got my debug drawing working - it would appear though that making it render wireframes for convex shapes just draws the model rather than the hull. However, from seeing when contacts were made/broken I could tell that collision detection between my btConvexHullShape objects was working ok.

I've now changed to using btBvhTriangleMeshShapes for more accuracy (geometry doesn't lend itself well to convex hulls) and now I'm not getting any contacts reported at all - debug rendering shows the wireframes to be intersecting so I'm not sure what's wrong? I've double checked the collision group filters and they're fine... What should I look at next?
LaceySnr
Posts: 11
Joined: Fri Mar 20, 2009 11:11 am

Re: btBvhTriangleMeshShape + Collisions (lack of)

Post by LaceySnr »

Please ignore / remove this - found the post I was looking for about concave collision detection which specified that you can't actually use btBvhTriangleMeshShape objects together! Will switch to btGImpactShapes instead.
LaceySnr
Posts: 11
Joined: Fri Mar 20, 2009 11:11 am

Re: btBvhTriangleMeshShape + Collisions (lack of)

Post by LaceySnr »

Ok, so two btGImpactShapes don't seem to be colliding either.

Collisions seem to register if I use one btConvexHull and one btGImpactShape or btBvhTriangleMesh, but I have a ship + a world, and it appears to use the convex hull of the world regardless of which way around I set them up (i.e. ship as a convex hull and the world as a GImpactShape still seems to mark a collision once the ship is within the area contained by the world's convex hull).

Really confused now!

EDIT - Posting information in case it'll help others from being as dim as me!

Realised I forgot the last step:
btGImpactCollisionAlgorithm::registerAlgorithm(dispatcher);

as mentioned in the following thread: http://www.bulletphysics.com/Bullet/php ... f=9&t=2927