Following The Crowd¶
Overview¶
Following The Crowd is the second rung of the perception ladder: once a profiled agent can no longer see its target, it copies the heading of nearby agents that still can, instead of stalling or guessing on its own. In motion, a crowd that straddles a corner or a doorway holds its shape, with the blind half riding the heading of the half still in contact rather than splitting into chasers and stragglers. Turn it on for any crowd where losing sight of the target for a moment should read as a shared setback, not an individual one.
A borrowed heading is only ever valid where the neighbour it came from is standing, and a follower can be a full Neighbor Radius away, which is enough to put a corner between the two. So the heading is checked against the navigation surface from the follower's own position before it is used. One that walks the agent into something it cannot cross is refused, and the agent drops to the rung below instead. In a scene with no baked Surface Flow Field there is no surface to check against, and the heading is used as-is.
Lives on the Perception Profile, not here
This is a section of the archetype's Perception Profile asset, the same asset Sight and Searching live on, not a field on the Behavior Profile. It only does anything for an agent that has a Perception Profile assigned at all, since an unprofiled agent always sees its target, and that also has Approach & Press enabled on its Behavior Profile, since the whole ladder runs inside that same pass.
The Simple and Advanced grouping below is this page's, not the inspector's. The Perception Profile has no mode switch and draws all six fields at once, so do not go looking for one.
Parameter Reference¶
Simple Parameters¶
Start here: the three that decide whether this does anything
Enabled¶
- Visible effect: An agent that loses its target picks up the heading of nearby agents that still have it, instead of freezing or turning straight to search on its own.
- Gameplay effect: Gives a crowd that straddles a corner or a doorway a reason to hold together instead of splitting into agents that kept the target and agents that did not.
- Increase when: Not applicable, it is a toggle.
- Decrease when: Not applicable, it is a toggle.
- Pitfalls: Off is the shipped default, so this whole rung of the ladder is skipped until you turn it on. An agent that loses contact falls straight through to Searching, or mills in place if that is off too.
- Technical effect: Gates the whole crowd-follow branch inside the arrival pass. Off, a lost agent falls through to the search destination, but only when Searching is on AND the navigation pass actually resolved somewhere walkable to go. A searcher walled off with no way around gets no steering either, and mills until Idle Motion and Forget Time take over.
Follow Strength¶
- Visible effect: Higher values make a blind agent commit hard to the heading it reads off nearby informed agents, so it reads as actively travelling with the group rather than drifting after it.
- Gameplay effect: The difference between a horde that holds shape through a corner and one that visibly splits into leaders and stragglers.
- Increase when: You want a horde that reads as one body even when part of it has lost the target.
- Decrease when: Stragglers should look uncertain or lag behind rather than commit fully to a borrowed heading.
- Pitfalls: This scales only the copied heading. It does nothing for how hard an agent pulls toward where it believes the target is; raise
Target Pulltoo if stragglers should also converge rather than just parallel the group. - Technical effect: Multiplies the averaged heading read from nearby leaders before adding it to steering, itself further scaled by the follow-memory fade once no leader is left nearby.
Neighbor Radius¶
- Visible effect: Sets how far a blind agent looks for someone to copy. Too small and a lone straggler finds nobody; too large and it borrows a heading from agents it is not really travelling with.
- Gameplay effect: Decides how loosely a crowd can be spread out and still hold together once part of it loses the target.
- Increase when: A spread-out crowd rarely finds a leader to follow. Check with the Swarm Debug window.
- Decrease when: Stragglers should genuinely fall behind rather than latch onto a leader several body-lengths away, or you need to cut the per-agent query cost.
- Pitfalls: Matching it to your crowd's spacing matters more than raising it. A radius much larger than agent spacing borrows a heading from a different cluster of the crowd, not the one the agent is actually walking with.
- Technical effect: Radius of the grid query that looks for same-target neighbours currently seeing the target and moving. A neighbour also has to have Approach & Press enabled with a weight above zero on its own Behavior Profile before it counts as a leader, so a crowd of mixed archetypes can contain agents that see the target and are never followed. Nothing beyond the radius is ever considered.
- Also:
0has the same effect as switching the behavior off, and the inspector says so with a warning.
Advanced Parameters¶
Power-user knobs: leave at defaults unless you have a reason
Max Neighbors¶
- Visible effect: Caps how many nearby agents on the same target are checked before the agent settles on a heading. Neighbours that have lost the target count toward the cap too, so in a packed crowd a low value can spend the whole cap on agents that know nothing and leave this one with nobody to follow.
- Gameplay effect: Controls the cost of a dense crowd all doing this at once. It changes how the crowd looks only when the cap is low enough to miss the informed neighbours.
- Increase when: A dense pile reads a noisy or wrong average heading because too few candidates were sampled, or agents in the middle of it stop following while informed neighbours stand inside
Neighbor Radius. - Decrease when: A dense crowd running this behavior shows up in the profiler.
- Pitfalls:
0turns the whole behavior off as completely as theEnabledtoggle, because the neighbour search returns nothing to follow while the section still reads as switched on. The inspector raises a warning when it sees a0here, and another whenNeighbor Radiusis0, which fails the same way. - Technical effect: Stops the neighbour scan once this many same-target neighbours have been checked, in grid traversal order rather than nearest-first.
Heading Memory Time¶
- Visible effect: How long an agent keeps walking on the last heading it copied, fading out, once nobody informed is left nearby, instead of stopping the instant its one leader turns away.
- Gameplay effect: Smooths a horde's motion when leaders come and go instead of producing a jerky start-stop follow.
- Increase when: Agents visibly stall the moment their one nearby leader loses the target or moves out of radius.
- Decrease when: Agents should drop a borrowed heading quickly once nobody nearby is informed, rather than coast on stale information.
- Pitfalls: A high value carries an agent on a heading nobody nearby holds any more, so it can drift past the point where the group it copied has already turned. What it can no longer do is walk that stale heading into a wall, because the check runs on a remembered heading exactly as it does on a fresh one. The drift is therefore a spacing problem on open ground rather than a collision one.
- Technical effect: Seconds the agent keeps steering along the last read leader direction, linearly scaled down to zero over that window once no leader remains in range. The countdown is in elapsed seconds rather than in passes, so a Reduced or Cheap agent gets the window you set, not one stretched by its slower cadence. Reading a fresh leader always buys at least the current step even at
0, which is what keeps the facing, the queue brake and the debug window agreeing with the steering that just ran.
Target Pull¶
- Visible effect: A small extra pull toward where the agent believes the target is, layered on top of the copied heading, so stragglers close distance instead of only paralleling the crowd.
- Gameplay effect: Keeps a follower converging on the fight rather than trailing the group at a fixed offset forever.
- Increase when: Followers visibly hang back from the crowd instead of tightening toward it over time.
- Decrease when: Agents should travel purely with the group, with no independent pull of their own.
- Pitfalls: This pulls toward the last position the agent itself knew about the target, never the target's live position. It is also scaled by
Approach Weighton the Behavior Profile, so raising that weight strengthens this pull too without touching the Perception Profile at all. - Technical effect: Adds a contribution toward the agent's own last known target position, scaled by this value, by
Approach Weight, and by the same memory fade that scales the copied heading. The direction is normalized first, so a distant remembered spot pulls no harder than a near one.
What else is in the mix¶
The vector this section produces is the sum of three terms, not one: the copied heading at Follow Strength, the Target Pull, and the archetype's Chase Wander at the same memory fade. The wander is a Behavior Profile field, so a follower inherits whatever the archetype uses while chasing. The navigation check described in the overview runs on that sum rather than on the copied heading alone, since what walks an agent into a wall is where it actually ends up going.
Practical Usage Guidance¶
Judge this against Searching rather than against nothing. A searcher already walks a real route to the spot it remembers, and that route usually points where its neighbours are going anyway. In the Zombie City sample, switching this on left fewer agents searching and the crowd read the same either way, which is why that sample ships with it off. It earns its place on an archetype with Searching switched off, where it is the whole difference between travelling with the group and milling in place until Forget Time runs out. With both on the handover runs both ways: Following The Crowd catches the agents that have an informed neighbour nearby, Searching picks up whoever is left, and a follower whose borrowed heading points into a wall hands itself over to Searching too, which has a route.
Skip it for an archetype with no Perception Profile at all, since it never runs. Skip it too for a tight single-target boss encounter where every agent should always know exactly where the boss is; giving that archetype a profile only invites a rung of the ladder it will rarely need.
Sight does not follow the LOD tiers
Sight is not tied to the importance tiers: a Reduced or Cheap agent is tested as often as a Full one. The range test runs every simulation step for every agent carrying a Perception Profile. With a view cone or Occlusion set to Navigation Path, an agent that is already fully aware of its target repeats the cone and wall tests only every few steps, unless Forget Time is short enough that the delay would show, so it can take a few steps to notice a wall that has come between them and to drop onto this rung. The steering this section produces is throttled the same way Approach & Press is, reapplying its last result on skipped steps, but assigning a Perception Profile to a very large archetype population is a cost decision on its own, independent of whether Following The Crowd is switched on.
Gameplay Interpretation¶
High Follow Strength with a generous Neighbor Radius reads as a horde that moves like one animal: lose sight of part of it and it still swings around a corner as a body. Low Follow Strength, or a radius too tight to find anyone, reads as a crowd that scatters the instant contact breaks, which looks broken rather than intentional unless that is the read you want.
Target Pull is the subtle one. A little keeps stragglers tightening toward the fight instead of trailing the group forever at a fixed gap. Too much and a straggler visibly fights its own copied heading, pulling toward a stale remembered spot while the group has already turned.
Quickstart: tune in this order
- Turn
Enabledon and assign the archetype a Perception Profile if it does not have one yet. - Set
Neighbor Radiusto match your crowd's spacing so stragglers actually find a leader. - Tune
Follow Strengthuntil the group reads as one body through a corner. - Raise
Target Pullonly if stragglers visibly trail the group at a fixed distance instead of converging. - Adjust
Heading Memory Timeif agents cut out the instant their one leader turns away. - Leave
Max Neighborsat its default unless a dense crowd shows up in the profiler.