SAT as an allround tool?

I´m thinking about ways to use SAT (“Separating axis theorem”) and when and how it´s useful. Since the test check every possible non-collision (and if there isn´t one, there has to be a collision), it´s hard to get any information. We just know “there is a collision” and how deep the objects are intersecting. Now, say I want to get a physical collision respons and bounce two objects against each other, I would have to resort to additional test, for example a line segment intersection test, get a normal and then a reflection vector… But I can do this without resorting to a SAT test first…?

So basically I´m wondering: Is SAT useful in cases where the collision respons require more information than a “minimum translation vector”? If it is, am I missing something or do you resort to additional test, like “line segment intersection” test?

I don’t think i have ever bothered using the SAT. I normally just use simple bounding geometry where collisions are easy to work out. Say a set of spheres/circles.

Just wanted to clear up a loose end about my SAT question just so nobody is confused by my former ignorance: No further intersection testing is necessary, as the minimum translation vector can be used as the normal when calculating collision respons (like objects boucing off each other). There… Now I can let it go. For now… :slight_smile:

… I would just use one of the many physic libarys out there.

I use bounding volumes like delt0r. You can perform a posteriori collision checks or a priori collision checks. In my case, I plan to do that:

  • I compute the bounding volume of the whole tarjectory between 2 instants for each object (if it has not moved, I directly use its bounding volume)
  • I compute the intersection of all bounding volumes (called “sweep tests” in the litterature) by pair of objects (if one of them has not moved, I have nothing else to do to check if there is a collision)
  • if there is an intersection, I use the equation of the movement of each object to know in which time interval it might have happened
  • if the intersection of both time intervals is not empty, I take its smallest value for the time parameter and I consider there is an intersection
  • use the physical data about both objects to compute the response if any

This is enough for a first person shooter with moving objects including helicopters. A posteriori collision checks are not enough in my case because a bullet can move a lot in 10 ms (about 3.5m); if I perform checks only at discrete times, I will obviously miss some collisions. Using a ray or a segment instead of the bounding box at discrete times is enough when one of the objects involved is not moving but if it is, using 2 rays may give false collisions.

There are some interesting physics libraries in Java but if you don’t understand the concepts, they are useless.

SAT is very easy to use in 2D as potential separating axes are very easy to find on convex polygons.