|Region's bounds. |
|Region's user-provided data. |
This is currently only used for the PxBroadPhaseType::eMBP broad-phase, which requires zones or regions to be defined when the simulation starts in order to work. Regions can overlap and be added or removed at runtime, but at least one region needs to be defined when the scene is created.
If objects that do no overlap any region are inserted into the scene, they will not be added to the broad-phase and thus collisions will be disabled for them. A PxBroadPhaseCallback out-of-bounds notification will be sent for each one of those objects.
The total number of regions is limited by PxBroadPhaseCaps::maxNbRegions.
The number of regions has a direct impact on performance and memory usage, so it is recommended to experiment with various settings to find the best combination for your game. A good default setup is to start with global bounds around the whole world, and subdivide these bounds into 4*4 regions. The PxBroadPhaseExt::createRegionsFromWorldBounds function can do that for you.
Region's user-provided data.