Skip to main content

Module narrowphase

Module narrowphase 

Source

Functionsยง

test_collision
Test collision between two rigid bodies. Returns a contact if overlapping. Contact normal always points from body_a toward body_b.
test_collision_manifold
Test collision between two bodies and return a contact manifold. This is the new entry point that generates proper 2-point manifolds using Sutherland-Hodgman clipping for polygon-polygon collisions.
test_collision_manifold_speculative
Test collision between two bodies with speculative contact detection. If bodies are separated but within the speculative margin, generates a contact with negative penetration (representing the separation distance). This prevents tunneling for fast-moving objects.