public sealed class DistanceLodGovernorAgents far from the focus sense less often.
Remarks
Three bands rather than a curve, because a continuous falloff makes every agent's interval a different number and the jitter that keeps them off each other's frames then has nothing to be jittered around. Three bands and a deviation give a schedule somebody can reason about: near agents are exact, far ones are approximately quarter-rate, and no agent's reaction time is a mystery.
With the shipped defaults and a 0.1 s interval, the far band lands on 4 Hz — doc 37 § D15's number for what an agent behind the player is worth.
⚠ The focus is where the player is, not where the camera is. A cutscene camera that swung across a level would otherwise wake every agent it passed, and a spectator camera in a multiplayer game would give whoever it followed a different AI from everybody else's.
Fields and properties (4)
public float NearRadiusInside this, in metres, the configured rate.
public float FarRadiusBeyond this, in metres, the slowest rate.
public float MidScaleWhat to multiply the interval by between the two radii.
public float FarScaleWhat to multiply it by beyond FarRadius.
Methods (1)
public float IntervalFor(PerceptionConfig config, float distance)Seconds until this listener's next pass.
Used by (1)
- ScheduleTestsVixen.Ai.Perception.Tests