Hold Nearby Swarm¶
Overview¶
Hold Nearby Swarm is local cohesion. Each agent samples nearby same-target neighbors, averages their positions, and steers toward that local center.
In motion, this keeps loose agents attached to the nearby body of the swarm. Stragglers drift back into the crowd and scattered groups read as one mass.
This is a supporting behavior, not a main pursuit behavior. Use it in small amounts.
Parameter Reference¶
Advanced Parameters¶
All parameters here are advanced — leave at defaults unless you have a reason
Use Hold Nearby Swarm¶
- Visible effect — Stragglers drift toward nearby group center.
- Gameplay effect — Makes the horde feel more unified.
- Increase when — Agents peel off too easily or look too loose.
- Decrease when — You want independent spacing and looser silhouettes.
- Pitfalls — This can fight
Personal Spaceif both are strong. - Technical effect — Adds the local same-target cohesion pass.
Group Pull Strength¶
- Visible effect — Higher values make agents snap back toward the pack faster.
- Gameplay effect — More cohesive hordes and fewer outliers.
- Increase when — Swarm edges break up too much.
- Decrease when — The crowd compresses too heavily.
- Pitfalls — Weight
0still leaves the neighbor-query pass active while enabled. - Technical effect — Scales steering toward the local neighbor center.
Group Pull Radius¶
- Visible effect — Larger values make cohesion operate over a broader local patch.
- Gameplay effect — Helps broken packs reconnect.
- Increase when — Outliers should feel the pack from farther away.
- Decrease when — The whole crowd gets too sticky and uniform.
- Pitfalls — Larger radii cost more because more cells are searched.
- Technical effect — Search radius for neighbors that define the local center.
Group Pull Samples¶
- Visible effect — Higher values stabilize the direction in dense crowds.
- Gameplay effect — More consistent cohesion in big swarms.
- Increase when — The pull direction feels noisy.
- Decrease when — Performance matters more than perfect consistency.
- Pitfalls — Sample order is traversal based, not a true nearest list.
- Technical effect — Caps sampled neighbors for local-center calculation.
Practical Usage Guidance¶
Use this behavior when the crowd should behave like one moving mass: shambling hordes, clustered infestation waves, or packs that should avoid leaving lone wanderers behind.
It works well with moderate Approach And Surround and mild Personal Space. Use low values first. Often the best version of this behavior is barely noticeable until you disable it.
Avoid strong cohesion for enemies that should flank, spread wide, or maintain deliberate lanes. It also tends to work against aggressive Orbit Style, because cohesion wants to pull inward toward nearby allies while orbit wants cleaner circling around the target.
Gameplay Interpretation¶
This behavior makes enemies feel more horde-like and less individually opportunistic. It can strengthen the sense of a rolling crowd front.
Too much of it makes the swarm feel sticky and conservative, reducing flanking variety and local motion.
Quickstart — tune in this order
Start low. Tune Group Pull Strength first and stop once stragglers reconnect. Only then adjust radius. Increase sample count last, and only for dense stress tests that show unstable cohesion.