Skip to content

Out-of-Sight Fallback

Overview

Out-of-Sight Fallback is a dependent subgroup of the Approach And Surround behavior. When enabled, agents that are farther from the target than Sight Distance stop directly pursuing and instead follow nearby allies who are still within sight.

In motion, informed agents at the front pull the rest forward, and stragglers flow behind the group instead of beelining through walls or across occlusion. With the toggle off (the default), every agent always treats the target as visible.

This feature is off by default. Enable it only when your game involves line-of-sight mechanics, environmental clutter that breaks direct awareness, or a crowd effect where stragglers should visibly follow leaders.

Dependent on Approach And Surround

This subgroup requires 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

All parameters here are advanced — leave at defaults unless you have a reason

Use Out-of-Sight Fallback

  • Visible effect — Distant agents stop beelining and copy nearby informed agents instead. Off keeps every agent always tracking the target directly.
  • Gameplay effect — Adds limited awareness so the swarm can lose contact and recover believably.
  • Increase when — You want fog-of-war, line-of-sight gameplay, or visible leader-following from stragglers.
  • Decrease when — Open-arena swarms feel best when every agent always pursues directly.
  • Pitfalls — Toggling on without also tuning Sight Distance to a meaningful value keeps the fallback dormant because all agents remain inside sight range. The other parameters in this subgroup do nothing while this toggle is off.
  • Technical effect — When off, Sight Distance is treated as infinite and the lost-target leader-following code path is never entered.

Sight Distance

  • Visible effect — Agents beyond this distance from the target stop direct surround steering and try leader following.
  • Gameplay effect — Sets where direct awareness ends and recovery begins.
  • Increase when — Open arenas should use direct pursuit most of the time.
  • Decrease when — You want fog-of-war or noise-following behavior that kicks in sooner.
  • Pitfalls — This is a distance check from the agent to the target center, not an obstacle raycast. Agents can have line-of-sight in the visual sense but still be "out of sight" if they are beyond this distance.
  • Technical effect — Agents farther than this from the target center fall back to lost-target leader following while Use Out-of-Sight Fallback is on.

Follow Nearby Agents

  • Visible effect — Stragglers copy the movement direction of nearby informed agents.
  • Gameplay effect — Keeps the horde moving as a group when some agents lose awareness.
  • Increase when — Agents outside sight range stall too often.
  • Decrease when — Blind agents should hesitate or wander more.
  • Pitfalls — Only active when Use Out-of-Sight Fallback is on. This weight is independent of Approach Weight, so high values can move lost agents strongly even if approach weight is low.
  • Technical effect — Adds steering along the average velocity of nearby same-target leaders that are still within their own sight distance.

Keep Moving Toward Target

  • Visible effect — Lost agents drift toward the expected target area instead of only matching neighbor velocity.
  • Gameplay effect — Maintains forward pressure during recovery so the crowd does not stall.
  • Increase when — Lost agents trail forever and never close distance.
  • Decrease when — Lost agents should rely almost entirely on visible leaders without self-directed seek bias.
  • Pitfalls — This biases toward the agent's assigned surround point, not the raw target position. High values can undermine the visual leader-following effect.
  • Technical effect — Adds a steering bias toward the distributed target point while leader following is active.

Memory Time

  • Visible effect — Agents keep moving briefly after leader guidance disappears instead of stopping abruptly.
  • Gameplay effect — Avoids sudden stalls when a crowd temporarily loses contact.
  • Increase when — Lost-target movement looks stuttery when leader supply breaks momentarily.
  • Decrease when — Agents overshoot around corners or should give up quickly.
  • Pitfalls — High values carry stale direction too far, especially around corners or through dense clutter.
  • Technical effect — Keeps using the last valid leader direction for this many seconds, fading over time.

Neighbor Follow Radius

  • Visible effect — Larger values make agents more likely to find a leader direction to copy.
  • Gameplay effect — Improves group coherence through occlusion or distance gaps.
  • Increase when — Recovery rarely activates because no leaders are found in the vicinity.
  • Decrease when — Performance matters or groups should fragment naturally.
  • Pitfalls — Larger radii scan more grid cells. Same-target filtering prevents cross-target pulling, but dense groups still cost more with larger radii.
  • Technical effect — Search radius for same-target leaders during lost-target recovery.

Neighbor Samples

  • Visible effect — Higher values make leader direction more reliable in dense crowds.
  • Gameplay effect — Stabilizes recovery direction in big packs.
  • Increase when — Dense swarms produce inconsistent recovery direction.
  • Decrease when — You need lower per-agent query cost.
  • Pitfalls0 disables leader finding entirely. Sampling is grid-traversal order, not exact nearest-neighbor sort.
  • Technical effect — Caps how many nearby agents are sampled while looking for leaders.

Practical Usage Guidance

Use this subgroup for swarms that move through enclosed spaces, crowds with explicit fog-of-war mechanics, or zombie-style designs where stragglers should visibly flow behind informed front agents.

The most important parameter to tune is Sight Distance. Set it to match your playfield: tight corridors need a shorter value, open arenas can stay very large or keep the toggle off entirely.

For straightforward open-arena swarms, leave the toggle off and skip this subgroup.

Gameplay Interpretation

With this on and a short sight distance, front agents who can see the player pull the back crowd along. With a generous sight distance, the behavior only kicks in at long range and reads more like a subtle cohesion assist.

Memory Time and Follow Nearby Agents together control whether lost agents freeze, drift purposefully, or keep flowing. For horde scenarios, moderate values of both tend to produce the best result.

Quickstart — tune in this order

  1. Enable Use Out-of-Sight Fallback.
  2. Set Sight Distance to match your scene's intended awareness range.
  3. Tune Follow Nearby Agents until stragglers rejoin the flow naturally.
  4. Adjust Memory Time to smooth out stutters.
  5. Increase Neighbor Follow Radius only if recovery rarely triggers because no leaders are found.
  6. Leave Neighbor Samples and Keep Moving Toward Target at defaults unless you see stalling or inconsistent direction.