Watch a hawk stoop onto a pigeon, a shopper thread through a crowd, or a sheepdog peel a straggler
back into the flock, and you are watching the same thing: a body that wants to be somewhere,
turning and accelerating toward that want without ever plotting a global route. It reacts to what is
near, moment by moment, and the path emerges. In 1999 Craig Reynolds — the same researcher whose
The magic is that a whole zoo of life-like motion — chasing, fleeing, wandering, dodging obstacles, threading a corridor — comes from one tiny machine plus a catalogue of one-line formulas. This page builds the machine, walks the catalogue, and shows precisely why seek orbits a target forever while arrive eases to a graceful stop.
Every steering agent is a vehicle: a point with a position
That is the entire engine. The clamps are what make it look alive: capping the force means the
vehicle cannot snap instantly onto a new heading — it must curve, banking into turns with momentum, the
way a real body does. Capping the speed keeps it from accelerating forever. Everything below is just a
different recipe for that first line, the raw force
Almost every behaviour shares one idea. You describe the velocity you wish you had — the
desired velocity
Geometrically that difference vector points exactly the way you must push to rotate your current
velocity toward the desired one, and its length says how urgently. Clamp it to
| Behaviour | Desired velocity (the idea) |
|---|---|
| Seek | Head straight at a target at full speed. |
| Flee | Head directly away from a target at full speed. |
| Arrive | Seek, but ramp speed down to zero inside a braking radius — no overshoot. |
| Pursue | Seek the predicted future position of a moving target. |
| Evade | Flee the predicted future position of a moving threat. |
| Wander | Steer toward a slowly-jittering point on a circle projected ahead — natural meandering. |
| Path following | Steer back toward a spline/corridor when you drift off it. |
| Obstacle / wall avoidance | Steer away from a predicted collision with a circle or wall ahead. |
| Flow-field following | Desired velocity is read straight from a vector field sampled at your position. |
Notice the family resemblances. Flee is seek with a minus sign. Pursue is seek aimed at where the target will be; evade is flee from that same prediction. Arrive is seek with a speed dial. Master seek and you have half the list for free.
Below, an agent sits with some current velocity (the solid arrow). The target is on a slider — drag it. The desired velocity points from the agent to the target; the steering force (dashed arrow) is desired minus current, the push that rotates the agent's heading toward the target. The faint circle is the braking radius: an arrive agent inside it wants a slower desired speed, scaled down toward zero at the centre, so it eases in instead of barrelling through.
Slide the target far away and near: notice the steering arrow always aims the agent's turn, and — for arrive — shrinks as the target enters the braking circle. That shrinking is the whole difference between a smooth landing and an endless orbit.
Put the agent at
1. Desired velocity — full speed straight at the target:
2. Steering = desired − current:
3. Clamp to
4. Integrate (mass 1, so
Arrive keeps the same desired direction as seek but scales the desired speed by how
far you are inside a braking radius
Outside the radius (
That is pursue. If you seek a moving target's current position you are
always aiming behind it — you tail-chase, curving into its wake. Pursue instead estimates where the
target will be after a short lookahead
Because the randomness is applied to a heading, not a position, and only a little each frame. Wander projects a small circle a short distance ahead of the agent and keeps a target point on that circle's rim. Each frame it nudges that point by a tiny random jitter along the rim, then seeks it. Because the point can only drift gradually around the circle, the heading changes smoothly — the agent meanders like a grazing animal instead of teleporting to a new random direction every frame (which would look like a twitching bug). The circle's radius sets how sharply it can turn; the jitter sets how restless it is.
Real characters do several things at once: seek a goal while dodging walls while keeping some wander. Reynolds gives three ways to fuse the individual steering forces into one.
The choice matters. A blind weighted sum is simple and often fine, but in a tight spot the avoid force and the seek force can nearly cancel and the agent drifts straight into the wall it was trying to dodge. Priority-based blending guarantees the life-or-death behaviour wins.
Two classic traps. First: plain seek never slows down. Its desired speed is always
Second: combining behaviours by a naive sum can go badly wrong. Opposing forces (seek
pulling right, avoid pushing left) can cancel, leaving the agent frozen or drifting into
danger; or many aligned forces can exceed
Steering behaviours are local, reactive, and cheap: no search, no map, just a force computed from what's nearby, run per agent per frame. Stack them and you get crowds, traffic, fish schools, RTS unit movement and enemy chase logic — all from position, velocity, two clamps, and a handful of one-line desired-velocity formulas. They pair naturally with a global planner (A* finds the corridor; path-following steering walks it smoothly), and they are the direct ancestor of the flocking rules you will meet next.