Collision Detection

Broad phase

overlapping axis aligned bounding boxes (red) of two bodies (black) that collide (left) or do not collide (right)

Narrow Phase

two bodies colliding
collision of two bodies where the surface closest to the penetrating vertex (both in red) would not be a good choice. Instead, I compute which surface (green) the line from center of body A to \mathbf{p}_A intersects with (green, left side of body B)