Skip to content

Out-of-Sight Fallback

Overview

Out-of-Sight Fallback is a dependent subgroup of the Approach & Press 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 each one beelining on its own heading. With the toggle off, which is the default, every agent always treats the target as visible.

"Sight" here means distance, nothing else

Despite the name, there is no raycast and no occlusion test anywhere in this behavior, or anywhere else in the steering code. An agent is out of sight when its planar distance to the target center exceeds Sight Distance, full stop. A wall between an agent and the target changes nothing, and an agent with a clear view down a long corridor still counts as blind. Routing around walls is the Surface Flow Field's job.

Turn it on when you want a crowd where stragglers visibly follow leaders instead of all converging independently, or when you are simulating limited awareness by distance. For a fog-of-war system driven by actual line of sight, this is not the mechanism.

Sight Distance Filled: informed, pressing the target directly Hollow: out of sight, copying their average heading Follow Radius wall Target
Sight is planar distance and nothing else. The agent behind the wall is well inside Sight Distance, so it presses the target as if the wall were not there. The agent outside the circle has no target of its own: it averages the headings of the informed agents that fall inside its Follow Radius, which is what makes stragglers trail the group instead of each picking its own line.

Dependent on Approach & Press

This subgroup requires Approach & Press to be enabled in the Approach Target section. When that behavior is off, the inspector greys out this subgroup.

Parameter Reference

Simple Parameters

The toggle itself is visible in Simple mode

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 distance-based awareness or visible leader-following from stragglers.
  • Decrease when: Open-arena swarms feel best when every agent always pursues directly.
  • Pitfalls: Check Sight Distance before deciding this does nothing. A profile you create yourself starts at 25 units and the fallback engages as soon as an agent trails past that, but the shipped default archetype profile sets 1000, which keeps every agent inside sight range forever. The other parameters in this subgroup do nothing while this toggle is off.
  • Technical effect: When off, the lost-target leader-following code path is never entered and Sight Distance is not consulted.

Advanced Parameters

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

Sight Distance

  • Visible effect: Agents beyond this distance from the target stop pressing toward it and try leader following instead.
  • 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 the follow-the-leader look to kick in sooner, closer to the target.
  • 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: Unlike Follow Nearby Agents, this one is scaled by Approach Weight as well as its own value, so raising approach pressure strengthens the seek bias too. High values undermine the visual leader-following effect.
  • Technical effect: Adds a steering bias straight at the target center while leader following is active, scaled by Approach Weight * Keep Moving Toward Target.

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 a stale direction too far, which shows up most around corners.
  • 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 when the crowd is strung out and leaders are sparse.
  • 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.
  • Pitfalls: 0 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 zombie-style designs where stragglers should visibly flow behind the informed front agents, or for any crowd spread far enough that you want the back of it moving as a group rather than as individuals.

The most important parameter to tune is Sight Distance. Set it to match how far your crowd normally strings out behind the target: a short value if you want most of the pack following leaders, a large one if only the true stragglers should.

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.