technique

Edge Collision Detection

When a moving object's position passes a boundary, multiply the velocity component perpendicular to that boundary by -1 so the object reflects back into bounds.

Also called: wall bounce · edge collision detection · velocity reflection

What it is

How it works

Parameters & tuning

Where it’s been used

Variants & neighbours

Go deeper


Revision 1 · 1 source · Something wrong? Tell us.