2
\$\begingroup\$

I have an axis aligned bounding boxes for 3D object collision, but I have a complex 3d mesh that's divided into 3d faces so I want to check for bounding boxes and collision with the faces of that object.

I know that this might cost efficiency since there are more faces to check, but I can fix the efficiency by only checking certain faces, which I think would give me a more accurate collision test than just using a bounding box for this complex object and an efficient check utilizing certain faces that more likely to collide.

However, I don't know the math to check 3d boxes and 3d faces, so I want to know how to create a collision test for this situation.

\$\endgroup\$
  • \$\begingroup\$ "but I have a complex 3d mesh that's divided into 2d faces" Those are not 2D faces, those are just 3D faces. "I know that this might cost efficiency since there are more faces to check" It doesn't cost more because that's how it's supposed to be. \$\endgroup\$ – Ferreira da Selva Aug 6 '18 at 22:49
  • \$\begingroup\$ Possible duplicate of Triangle-Plane intersection in 3D space \$\endgroup\$ – Ferreira da Selva Aug 6 '18 at 22:51
  • \$\begingroup\$ you're right, but how do you check 3d faces with AABB. i'll edit my question \$\endgroup\$ – karamazovbros Aug 6 '18 at 22:51
  • \$\begingroup\$ they're quad faces though \$\endgroup\$ – karamazovbros Aug 6 '18 at 22:52
  • \$\begingroup\$ Quads are just 2 triangles. If you don't care about the intersection details, you can just check if one of the triangle vertices are inside the AABB. If you want the intersection details (the points of the intersection), then you break the quads into triangles and use the algorithm in geomalgorithms.com/a06-_intersect-2.html#Triangle-Plane \$\endgroup\$ – Ferreira da Selva Aug 6 '18 at 22:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.