Apex › Storage & databases

How games detect collisions (SAT)

The exact test behind convex collision detection: two convex shapes are disjoint if and only if some axis exists on which their projected shadows don’t overlap. For polygons only the edge normals need checking — one gap on any axis proves no collision, and if every axis overlaps, the smallest overlap gives the minimum push to separate them. Real SAT verified against a brute-force oracle. Slide a triangle through a square and watch the shadows open a gap.

More in Storage & databases