steerkit Reynolds' steering behaviors, small and engine-agnostic

Collision avoidance

Two streams of agents cross, and the pointer walks through them. Each agent predicts when it would pass closest to every other, and dodges the soonest one it would bump into: two agents head-on both turn right, and pass. Turn it off to see them run into each other: the counter shows how often two come within reach.

  • velocity
  • desired velocity
  • steering force

TypeScript