# SAT Revisited

This topic is 2766 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello all!

I'm building a SAT test method for two polytopes, and got to wondering: why must I test every edge axis? If I have the center point of each polytope, why can't I project onto the axis formed by the line between the centers? Could anyone give me an example of why that wouldn't always work?

Sorry if that's a silly question, but I have the most amazing migraine right now and thinking hurts.

##### Share on other sites
Ha, never mind! Migrane went away and I figured out why shortly later.

Just for anyone else who might have the same question:

If you rotate each shape around its center you can end up with false positives. Same if one shape is significantly smaller and very close.

##### Share on other sites
Even though you already figured it out, here is my favorite example for people who read this thread in the future. It's just two boxes close to each other but offset:

##### Share on other sites
What you can do, is use the direction vector from one center to the other to discard faces unlikely to form a separating axis.

Say if you have convex shapes A and B with d as the vector (Center of B) - (Center of A) any faces from A with a Normal 'Na' for which Dot(d,Na) is a negative number and any faces of B with Normal 'Nb' for which Dot(d,Nb) is a positive number can be discarded as separating axis.

This is something I came up with as an optimization so use it at your own risk , the logic is that you are discarding the faces that are farther away from a posible instersection point and keeping the ones that are closest to it.

• ### Game Developer Survey

We are looking for qualified game developers to participate in a 10-minute online survey. Qualified participants will be offered a \$15 incentive for your time and insights. Click here to start!

• 11
• 23
• 36
• 16
• 75