steerkit Reynolds' steering behaviors, small and engine-agnostic

Containment

The agents wander in a box. When one would cross the margin (dashed) within lookAhead seconds, it turns back toward the inside at full speed, keeping its velocity along the wall: it slides off the walls rather than bouncing. Inside the margin, the force is zero, and wander has the agent to itself.

  • velocity
  • desired velocity
  • steering force

TypeScript