top of page
Update-pipeline.PNG

Collision Detection:

  • Construct a bounding sphere for every object

  • First check bounding sphere interception

  • Then use Separate Principle Axis Theorem to check object interception

Impulse-based Collision Response:

  • Use the contact points computed from the collision detection step

  • For each contact point, start from the point with the highest colliding velocity:

    • Compute inverse mass matrix for the offset point

    • Compute impulse to correct the velocity (Nonconvex Rigid Bodies with Stacking, Eran Guendelman et al)

    • Update other point’s velocity based on the impulse applied on this point

  • Recursively fix every contact point velocity so that every point has a velocity separating the colliding objects

Blue spheres are fixed -- their velocities and positions are not updated. Yellow sphere drops and collides with blue spheres. The collision impulse generated between the left and right blue spheres balances out and keeps the yellow sphere rest in the middle.

The ball rolls down from each blue sphere. The friction slows the ball down but does not prevent it to slide and fall.

Three boxes with different shape and mass free fall to the ground. They are not jiggling when rested due to the collision handling pipeline. For each frame, the engine predicts the position of the box for next frame. Resolve potential collision using impulse. Then the box position is updated using the new linear velocity and angular velocity.

Three boxes free fall and collide with each other. Collision detection is achieved by SPA. For each frame, the engine first run pair-wise object collision resolver, then detect ground collision, then rerun the pair-wise object collision resolver based on the updated velocities. This is mainly because I didn't handle the ground as an object. 

Basic one joint  

Double Pendulum

bottom of page