Skip to content

Behaviors

Behaviors are modular steering passes that run each simulation step. Enable them in a SwarmBehaviorProfile assigned to your archetype. Most profiles only need two or three active behaviors.

Finding a behavior setting fast

The Behavior Profile inspector has a search-and-filter bar at the top. See Finding a Setting to search by word or symptom, or to show only the fields you have changed.

Where to start

Game type Recommended behaviors
Default horde Approach & Press, Personal Space, Idle Motion
Survivor-like crowds Approach & Press (strong), Personal Space (moderate)
Melee packs Approach & Press + Personal Space
Flankers / interceptors Add Predictive Catch-Up
Harassers / strafing enemies Orbit Style + light approach pressure
Loose crowd cohesion Small Hold Nearby Swarm (tune carefully against Personal Space)

Game view of swarm agents pressing in around the player target

Approach & Press + Personal Space: agents close on the target, press against it, and hold their spacing through the crowd instead of collapsing to a single point.

Simple mode field finder

The inspector's Simple mode surfaces a condensed set of fields organized into four blocks. Each field links to its full documentation in the Advanced subgroup pages.

Simple block Field Full documentation
Approach Target Approach Weight Approach & Press
Approach Target Combat Standoff Approach & Press
Crowd Spacing Spacing Strength Personal Space
Crowd Spacing Spacing Radius Personal Space
Out-of-Sight Fallback Use Out-of-Sight Fallback Out-of-Sight Fallback

Runtime blending

Behavior steering is additive — the manager combines all enabled contributions, clamps the result to unit length, smooths it through the movement profile, and multiplies by Max Speed.

Key points:

  • Disable, don't zero. Several behaviors cost query budget even when their weight is 0. Disable the behavior fully when you want it gone.
  • Weights are relative, and they saturate. A weight of 2 on Approach against 1 on Personal Space makes Approach pull twice as hard before the clamp. The combined steering is capped at unit length, though, so once the total reaches that cap raising one behavior's weight only turns the result toward it and pulls the others down — past the cap a weight stops being independent. Tune in small steps and watch the whole mix, not one knob.
  • Agent Spacing Scale in SwarmSettings0 disables Personal Space entirely. Values above 1 expand effective spacing radii for approach and orbit.
  • Approach & Press uses a built-in LOD. When Use Out-of-Sight Fallback is on, agents outside Sight Distance fall back to lost-target leader following; with the toggle off (the default), every agent always pursues directly. Reduced and Cheap tier agents reuse cached steering, refreshed every N fixed steps (Approach And Press Reduced Interval / Cheap Interval in SwarmSettings).

Importance LOD and behavior cost

The LOD system (configured in SwarmSettings → Importance LOD) reduces behavior frequency for distant agents:

Tier Behavior cost
Full All behaviors run every step
Reduced Personal Space runs at reduced rate and with fewer samples. Approach & Press steering recomputed every N steps (cached between)
Cheap Personal Space even less frequent, further-reduced sample cap. Approach & Press steering recomputed even less often (cached between)

Tier thresholds are set by Reduced Quality Start Distance (Full → Reduced) and Cheap Quality Start Distance (Reduced → Cheap). Full Quality Agent Cap prevents cost spikes when many agents converge on one target.

Diagnosing behavior problems

When a behavior change has no visible effect, or an agent moves in an unexpected direction, use Swarm Debug (Tools > Massive Swarm System > Swarm Debug). It shows the live steering contribution from each behavior for one selected agent, and lets you isolate or mute individual behaviors without editing profile assets.

See Swarm Debug for the full reference.

Behavior sections