Skip to main content

Module resolve

Module resolve 

Source

Functionsยง

initialize_contacts
Pre-compute solver data for each contact: velocity bias (restitution) and tangent direction. Must be called ONCE per frame before warm starting and solver iterations. This follows the Box2D approach: bias and tangent are fixed for the entire solve.
resolve_contacts
Sequential impulse solver for contact resolution (backward compat).
resolve_contacts_position
Position correction (Baumgarte stabilization) for all contacts. reverse: if true, iterate contacts in reverse order.
resolve_contacts_velocity_iteration
One iteration of velocity-level contact resolution with accumulated impulse clamping. reverse: if true, iterate contacts in reverse order (for alternating Gauss-Seidel).
warm_start_contacts
Pre-apply cached impulses from previous frame (warm starting). This gives the iterative solver a head start, dramatically improving convergence for stacks.