AABB collision with edge of convex polyhedron

Started by
1 comment, last by Dirk Gregorius 10 years, 11 months ago

So far I've been doing AABB-Plane intersection tests to find the collision between an AABB and a mesh. This works fine if the AABB collides with one of the sides, however if it hits one of the edges I can't use this method:

2Qv8u.jpg

(The AABB starts at the top right and moves to the bottom left, red and green are the intersections with the mesh planes)

I'm at a loss, could anyone point me in the right direction?

Advertisement

Please Google "triangle in AABB collision" you will find many helpful links, many from this site.

You can use the separating axis test for this. I can a presentation this year at the GDC. The presentation is quite dense so I also decided to release the source code. You can find it here:

https://box2d.googlecode.com/files/DGregorius_GDC2013.zip

This topic is closed to new replies.

Advertisement