reactphysics3d icon indicating copy to clipboard operation
reactphysics3d copied to clipboard

Collision detection in an octree

Open v71 opened this issue 2 years ago • 1 comments

Good day, before adopting reactphysics3d in my projects , I'd like to know if it is possibile to create a convex shape as a collison mesh for each node of an octree, in a way that if an object is inside the node, the physcs engine would provide collison detection and response only for the surfaces contained in the node itself and not for the entire mesh containig all the triangles in the collision mesh. I hope I've been clear

v71 avatar Apr 12 '23 21:04 v71

I am not sure if I really understand your question but all the bodies of the world in ReactPhysics3D are part of an AABB tree structure (similar to an octree). The first part of the collision detection is the broad-phase collision detection where we compute all the pair of bodies that need to be tested later during the narrow-phase collision detection. When we create a concave mesh (triangle mesh or heightfield) an internal AABB tree is generated for that only to store all the triangles in a AABB node. In ReactPhysics3D, there is no internal AABB tree for a convex mesh.

Can I please ask you next time to ask this kind of questions in the discussions section instead of opening an issue?

DanielChappuis avatar Apr 13 '23 20:04 DanielChappuis