For collision detection (moving vs. non-moving) in my current project, I decided to implement an octree approach after the preselection.
The only collision detection I'm currently using is a AABB-vs.-AABB collsion detection. Now, if this detection returns true
for two objects (n, m)
, I want to subdivide the AABB into eight smaller axis-aligned boxes, and so on. (Octree)
Implementing the subdivision itself is now problem for me, but I'm stuck at the following: How can I determine whether a node needs to be divided further, or whether further subnodes are unnecessary?
Since I got objects of various complexity (a model with ca. 1500 vertices vs. a cube with 8), I can't simply check for the amount of vertices inside an octant.
What ways are there to determine whether a subdivision is necessard? Or am I even using a wrong approach any something else might work better?
Edit: I now think that an octree might be the wrong approach. What would be the best way to check for a more exact collision detection after an AABB collision detection returns true?