Avoidance
Avoidance is the local steering that keeps agents from stacking on top of each other. It is always on - without it, agents heading to nearby slots would pile into a single point - so there is no enable/disable toggle, only tuning. It works alongside navigation: routing decides where the group goes; avoidance decides how individual agents flow past each other and around standing units on the way.
The two forces
Splitting the two means you can keep moving crowds loose and responsive while keeping standing formations stable.
Per-team overrides
Both values above are global defaults. You can override them for a specific pair of teams at runtime:
Crowd->SetTeamAvoidance(1, 2, 0.0f, -1.0f); // teams 1 and 2 don't jostle in transit,
// but still step aside when idle
0 disables that push, a negative value follows the global slider, and passing the same team
twice sets the rule within a team. See Teams.
Interaction with walls
Avoidance handles agent-to-agent spacing. Walls are separate: with Has Collision on
(bWallCollision), agents are physically stopped at wall tiles in the same integration step,
so they don't get pushed through a wall by a crowd behind them.
TIP
If agents feel like they're vibrating in dense packs, lower Strength first. If a moving group bulldozes through standing units, raise Settle Push. If standing units scatter too easily and are slow to reform, lower it.
What's tunable today
Agents touch when their centres come closer than the sum of their radii - the global
radius (Agent → Radius) by default, or a
per-agent radius where one is set.
Per-agent speed and per-team avoidance overrides are also supported - see
Per-Agent Speed and Teams.