Hello,
I am in need of a way to test intersection between arbitrary shapes. I am interested in using Bullet for this because it supports all of the various collision shapes that I may need to use. However, I would like to keep the usage of Bullet extremely minimal because all I need to be able to do is check if one shape collides with another. Basically I would like to be able to define two btCollisionObjects, set their transforms, and use their checkCollidesWith method to determine if the two shapes intersect. Would it be possible to use the Bullet engine this minimally? I have tried exactly this, but I seem to be running into problems with setting the transforms. I have tried using btCollisionObject->setWorldTransform but it doesn't seem to be working correctly. Setting the world transform on one btCollisionObject seems to set the worldTransform for all btCollisionObjects. Any advice would be greatly appreciated.
Minimalist usage of Bullet
-
- Posts: 82
- Joined: Sun Apr 04, 2010 10:08 pm
Re: Minimalist usage of Bullet
You should be able to do what you want. It should not work like you describe.
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Minimalist usage of Bullet
You can use the btCollisionWorld::contactTest, or even more low level you can use GJK directly, see Bullet/Demos/CollisionInterfaceDemo or ConvexHullDistance.