DanielChappuis / reactphysics3d

Open source C++ physics engine library in 3D

Home Page:http://www.reactphysics3d.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Collision detection in an octree

v71 opened this issue · 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

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?