IT lexicon › Programming › Swept AABB

Swept AABB

Programming På svenska → Updated: 2026-10-24

A collision test that treats a moving box as a smeared-out volume, so fast objects can't slip through walls between two frames.

A naive test that only checks for overlap each frame misses a bullet that jumps past a thin wall in a single step — the failure is called tunneling. Swept AABB instead computes the time of impact along the movement vector, finds the first contact, and resolves the collision exactly there.

It stays cheap because axis-aligned boxes reduce the problem to per-axis interval maths (the slab method). Generalizing it to arbitrary shapes is called continuous collision detection (CCD), which is pricier — so it is often reserved for exactly the fast objects that need it.

← Back to the lexicon