Simple collisionDetection and Bounding Mesh

Please don't post Bullet support questions here, use the above forums instead.
Higestromm
Posts: 2
Joined: Mon May 31, 2010 7:53 am

Simple collisionDetection and Bounding Mesh

Post by Higestromm »

Hi,

I'm working on a project that only need detection collision from bullet (my objects will not have a realistic movements so I need to move them myself).
As I'm starting with bullet, I training myself with 2 boxes.

At the moment, I juste want to draw the bounding boxes of my objects with this code :

Code: Select all

btCollisionShape *collisionShape = new btBoxShape(btVector3(100,100,100));
 
btTransform t;
btVector3 min(0,0,0);
btVector3 max(0,0,0);
collisionShape->getAabb(t, min, max);
I've believed that this code returns me the actual transformations and size of the collisionShape, but min and max only give me (0,0,0).

Can you tell me what I'm doing wrong ?

Anybody here have a link that explain how to use Bullet only to detect collision ?

Than you :D
Higestromm
Posts: 2
Joined: Mon May 31, 2010 7:53 am

Re: Simple collisionDetection and Bounding Mesh

Post by Higestromm »

Ok I finnaly found the CollisionInterfaceDemo that help me :)

But I'have a question : I've created a btBvhTriangleMeshShape and I want to show the bounding box.
When I do it, I see that the bounding box is always a cube height=lenght=depth. Is it normal ?

Thank you