Static vs dynamic collision detection
-
- Posts: 861
- Joined: Sun Jul 03, 2005 4:06 pm
- Location: Kirkland, WA
Static vs dynamic collision detection
What is the recommended way of colliding static vs dynamic geometry. IIRC you suggest to create an AABB tree for the static geometry (e.g. level geometry) while maintaining the dynamic shapes in the the SAP space. So how do I collide dynamic vs static? Do I need to test all dynamic objects vs the AABB tree? Do I need to insert the AABB tree (shape) into the SAP? What is the recommended way of dealing with this? Any examples where I can look this up in Bullet?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: Static vs dynamic collision detection
There is no special case for concave triangle meshes. All rigidbodies or collision objects have their collision shape. A static concave triangle mesh should use btBvhTriangleMeshShape, which internally uses a highly optimized compressed aabb tree.
Then you just insert the collision object into the broadphase, ideally Sweep and Prune.
In rare cases, for extreme large streaming worlds, you might get large batches of new objects that cause a performance spike. This can be solved by using a hybrid method internally (using MultiSAP or Sap+loose octree). However, for most of the applications, just using SAP is fine.
Hope this helps,
Erwin
Then you just insert the collision object into the broadphase, ideally Sweep and Prune.
In rare cases, for extreme large streaming worlds, you might get large batches of new objects that cause a performance spike. This can be solved by using a hybrid method internally (using MultiSAP or Sap+loose octree). However, for most of the applications, just using SAP is fine.
Hope this helps,
Erwin