I'm new with bullet physics (I started this morning ) and I have few questions or confirmations to use spatial partitioning with bullet physics.
I want use bullet physic in my game engine. I have already done a spatial partitioning with an Octree to optimize the rendering when there are many objects in my world. This is a dynamic octree; recalculate in runtime.
I can get the neighbors of an object from its sector(s):
Code: Select all
GameObjectList GameObject::GetNeighbors(); // Generally there is a maximum of 10 neighbors.
How can I do to use my octree to help the physics engine?
Before posting, I do a lot of research, especially on this forum. I found some interesting things, but I'm not sure.
I don't think I can create a btDiscreteDynamicsWorld by sector because objects may overlap several areas.
Maybe I have to use collision group (or mask, I do not know the difference the moment) for each sector.
Apparently, this is the role of btBroadphaseInterface to check candidates for collisions. Is there a way for me to provide it the list of objects on which to operate?