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.
Where to start¶
| Game type | Recommended behaviors |
|---|---|
| Default horde | Approach And Surround, Personal Space, Idle Motion |
| Survivor-like crowds | Approach And Surround (strong), Personal Space (moderate) |
| Melee packs | Approach And Surround + Close-Range Pressure |
| 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) |
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 & Surround |
| Approach Target | Combat Standoff | Surround Shape |
| Approach Target | Surround Width | Surround Shape |
| Crowd Spacing | Spacing Strength | Personal Space |
| Crowd Spacing | Spacing Radius | Personal Space |
| Close Range Combat | Strike Distance | Close-Range Pressure |
| Close Range Combat | Attack Rhythm | Close-Range Pressure — Simple-mode compound; drives Turn-Taking Cycle and Press Window together |
| Close Range Combat | Max Active Attackers | Close-Range Pressure |
| Close Range Combat | Circling Weight | Close-Range Pressure |
| 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. A weight of
2on Approach with1on Personal Space means approach contributes twice as strongly before clamping. Agent Spacing Radius ScaleinSwarmSettings—0disables Personal Space entirely. Values above1expand effective spacing radii for approach, surround, and orbit.- Approach And Surround uses a built-in LOD. When
Use Out-of-Sight Fallbackis on, agents outsideSight Distancefall back to lost-target leader following; with the toggle off (the default), every agent always pursues directly. Adaptive slot solving only runs near the target for Full-tier agents.
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. Adaptive surround and Close-Range Pressure skipped by default |
| Cheap | Personal Space even less frequent, further-reduced sample cap |
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 the Agent Debugger (Tools > Massive Swarm System > Agent Debugger). 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 Agent Debugger for the full reference.