Home▸Game Development▸Separating Axis Theorem for Oriented Boxes: Axis Intervals and Overlap Bars (2D)

Separating Axis Theorem for Oriented Boxes: Axis Intervals and Overlap Bars (2D)

A top view of two oriented boxes with their SAT overlap, the 1D projection intervals on the axis of least penetration, and a bar for the overlap on each of the 15 candidate axes.

Game Development2DModerate60 FPS📱 Mobile-adapted🟠 Blender⇄ 3D version
Separating Axis Theorem for Oriented Boxes: Axis Intervals and Overlap Bars (2D) ↗ Open standalone

Two crates drift and tumble through each other while the Separating Axis Theorem tests all 15 candidate axes: 3 face normals of each box and the 9 edge-edge cross products. See the projection intervals on the deciding axis, the separating plane when the boxes are apart, and the minimum translation vector that pushes them just out of contact when they overlap. Resize both boxes, change the orbit and spin, and check the depth against a brute-force search of 150,000 directions. A Blender-built crate scene with numerical checks.

⚙ Under the hood

A top view of two oriented boxes with their SAT overlap, the 1D projection intervals on the axis of least penetration, and a bar for the overlap on each of the 15 candidate axes.

Separating Axis TheoremCollision DetectionOriented Bounding BoxMinimum Translation VectorGame PhysicsConvex PolyhedraComputational Geometry

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)