Hi,
I would like to combine the dynamics part of the bullet library with my own collision system. What should I study so I am able to do so? Is there some tutorial covering this?
Thank you,
frca
Bullet dynamics combined with user collision engine
-
- Posts: 39
- Joined: Sat May 02, 2009 9:38 am
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Bullet dynamics combined with user collision engine
If you want to replace the broadphase collision detection, best is to derived from btBroadphaseInterface. For narrowphase collision algorithms, you can implement custom collision algorithms.
If you want to replace the entire collision pipeline, it will be harder. You have to somehow work around existing implementations. For a start, you want to derive your own class from btDiscreteDynamicsWorld and override 'performDiscreteCollisionDetection' method. Somehow you will have to provide contact points. Currently they have to be stored in btPersistentManifold structures, stored in the btCollisionDispatcher.
It will probably be easier to just take the constraint solver, and re-implement around your collision detector. Bullet 3.x might make it easier to replace the entire collision pipeline.
Good luck,
Erwin
If you want to replace the entire collision pipeline, it will be harder. You have to somehow work around existing implementations. For a start, you want to derive your own class from btDiscreteDynamicsWorld and override 'performDiscreteCollisionDetection' method. Somehow you will have to provide contact points. Currently they have to be stored in btPersistentManifold structures, stored in the btCollisionDispatcher.
It will probably be easier to just take the constraint solver, and re-implement around your collision detector. Bullet 3.x might make it easier to replace the entire collision pipeline.
Good luck,
Erwin