Skip to content

Surround Shape

Overview

Approach And Surround Shape is the configuration subgroup that decides the size and character of the ring the swarm forms around the target. It is part of the Approach And Surround runtime behavior and only becomes active when that behavior is enabled.

In motion, these settings control the visible band the crowd occupies: how tightly it wraps the target, how strongly crowd density pushes the ring outward, and whether agents slide sideways into open lanes while closing in.

The pursuit mechanics — approach weight, arrival easing, and trailing offset — live in Approach & Surround. The settings here are purely about shape.

Dependent on Approach And Surround

All parameters in this subgroup require Approach And Surround to be enabled in the Approach Target section. When that behavior is off, the inspector greys out this subgroup.

Parameter Reference

Advanced Parameters

Power-user knobs — leave at defaults unless you have a reason

Combat Standoff

  • Visible effect — Adds extra space between the target body surface and the nearest edge of the surround ring. Zero lets agents press against the body.
  • Gameplay effect — Sets how much breathing room melee enemies leave around the target.
  • Increase when — Boss-style targets should not be mobbed into the chest, or agents need to arrive without clipping.
  • Decrease when — Zombies, beetles, or melee swarms should make tight contact.
  • Pitfalls — This is extra padding beyond targetBodyRadius + agentRadius, not a hard-coded distance from the target pivot. Leave at 0 for tight melee. The target body radius comes from the SwarmTarget component, not from this profile.
  • Technical effect — Inner ring = targetBodyRadius + agentRadius + combatStandoff. When Combat Standoff exceeds Strike Distance (Close-Range Pressure), agents may sit outside close-range queue range.

Surround Width

  • Visible effect — Wider values create a broader wraparound band; narrower values concentrate agents tightly around the inner ring.
  • Gameplay effect — More width improves surround readability and reduces single-file chasing. Less width keeps the crowd tight and pressured.
  • Increase when — Large groups should fan out or avoid hiding each other.
  • Decrease when — You want a tight horde or a narrow chase lane.
  • Pitfalls — Too high can make enemies look passive or scattered. When an attack profile is configured, the outer ring is auto-capped at the agent's attack reach — extra Surround Width beyond that cap has no visible effect for melee agents.
  • Technical effect — Adds extra radius beyond the inner ring. The final outer ring may expand further from density reaction, then is clamped at innerRing + max(SwingReach, ContactReach) when an attack profile is set.

Density Reaction Radius

  • Visible effect — In larger crowds, agents push the ring farther outward; small groups show little change.
  • Gameplay effect — Keeps big hordes readable and reduces center collapse without touching Surround Width directly.
  • Increase when — Hundreds of agents pack too tightly around one target.
  • Decrease when — Small packs look too loose or the ring expands too much as count rises.
  • Pitfalls — The name sounds like a neighbor query radius, but it is a crowd-size expansion scale: sqrt(assigned agent count) * density scale.
  • Technical effect — Expands the surround radius proportional to the square root of the assigned agent count and the Agent Spacing Radius Scale in SwarmSettings.

Surround Drift

  • Visible effect — Agents slide sideways around the target instead of pushing straight inward.
  • Gameplay effect — Adds life, helps agents find open lanes, and breaks up obvious columns of approach.
  • Increase when — The ring looks locked or agents push straight through each other.
  • Decrease when — You need direct, readable pursuit or agents are overshooting their slots.
  • Pitfalls — Keep this low. High drift can create unwanted orbiting and cause agents to miss melee contact.
  • Technical effect — Adds tangential steering inside the surround radius, scaled by approach weight and stronger near the target.

Reassign Threshold

  • Visible effect — Higher values make agents hold their current side longer. Lower values make them switch to better opportunities more readily.
  • Gameplay effect — Controls stability versus adaptability in the surround band. Higher threshold means fewer visual switches; lower means faster gap-filling.
  • Increase when — Agents jitter between nearby openings.
  • Decrease when — Agents refuse to move into clearly better open space.
  • Pitfalls — This is not a plain distance threshold; it participates in the adaptive slot scoring, which runs near the target for Full-tier agents only.
  • Technical effect — A cached surround opportunity is kept unless a new candidate scores better by roughly this threshold squared. Only active agents that pass the LOD and sight gates run this logic.

Slot Stickiness

  • Visible effect — Agents keep a consistent local side once settled instead of churning continuously.
  • Gameplay effect — Makes packs feel more stable and less noisy.
  • Increase when — The crowd churns around the target too much.
  • Decrease when — You want fluid reshuffling and fast gap filling.
  • Pitfalls — Too much stickiness can make agents ignore useful openings. This mostly affects near-target adaptive surround, not the cheap outer-crowd chase path.
  • Technical effect — Adds a scoring penalty for candidates far from the cached surround offset.

Practical Usage Guidance

Tune Combat Standoff and Surround Width first — those two define the ring size visible to every player. Use Density Reaction Radius only after testing with the intended group size, since its effect is proportional to agent count.

Surround Drift adds life to static-looking formations. Keep it small; high drift undermines combat contact. Reassign Threshold and Slot Stickiness only matter when large crowds settle near the player for extended periods. For most scenes, defaults work well.

Do not raise Surround Width beyond the agent's attack reach when your enemies are melee — the auto-cap means the extra width has no effect and only causes confusion.

Gameplay Interpretation

A narrow ring with low Surround Width makes enemies feel like a press of bodies, tight and threatening. A wider ring with moderate Density Reaction Radius reads as a distributed horde that spreads intelligently around the player without collapsing to a point.

Slot Stickiness and Reassign Threshold are invisible to the player but affect how stable the ring looks over time. Stable rings read as coordinated; churning rings feel more chaotic.

Quickstart — tune in this order

  1. Set Combat Standoff (usually 0 for melee) and Surround Width to define the enemy band.
  2. Add small Density Reaction Radius only after testing with the real intended crowd size.
  3. Add small Surround Drift if the ring looks locked in place.
  4. Leave Reassign Threshold and Slot Stickiness at defaults unless you see jitter or agents ignoring open space.