Vixen
caa30e12
csharp
public record class PerceptionConfig

Everything one kind of agent perceives with, and how often.

Read the guide page for this →

Remarks

Shared by every agent of that kind, exactly the way a BehaviorTreeTemplate is: an AiPerception names one by index and carries no settings of its own. The thousand guards in a level have one of these between them.

⚠ A record class rather than a record struct, and that is not a style choice. A record struct's new() is its zero value — the primary-constructor defaults only apply when somebody names the constructor — so a config built with an object initialiser would silently get a sight radius of zero. The same trap cost P2 a working layout; here a class's field initialisers run whatever the caller writes.

Fields and properties (14)

  • public Symbol Name

    What it can be called.

  • public SenseMask Senses

    Which senses it runs. A sense not in here costs nothing at all.

  • public SightSettings Sight

    Its sight.

  • public HearingSettings Hearing

    Its hearing.

  • public TouchSettings Touch

    Its sense of touch.

  • public DamageSettings Damage

    What being hurt tells it.

  • public TeamSettings Team

    How far it relays to allies.

  • public float Interval

    Seconds between passes for one listener, before distance LOD.

  • public float RandomDeviation

    How much to jitter that interval, in seconds. ⚠ Zero puts every agent spawned in the same frame on the same tick for ever, which is a frame that costs the whole population.

  • public float Memory

    Seconds a target stays in the perceived list after it stops being perceived. This is what "search where he was" is made of.

  • public int MaxPerceived

    The most targets one listener keeps. The oldest goes when it is full.

  • public IPerceptionFilter Filter

    Who it is allowed to perceive.

  • public IBlackboardBinding? Binding

    How its perceived list reaches its blackboard, or null to write nothing.

  • public float MaxRadius

    The furthest any of its senses reaches, which is what the broad phase is asked for.

Used by (18)

  • AiGameplayDebuggerVixen.Ai.Diagnostics
  • BindingTestsVixen.Ai.Perception.Tests
  • DistanceLodGovernorVixen.Ai.Perception
  • FilterTestsVixen.Ai.Perception.Tests
  • FixedRateGovernorVixen.Ai.Perception
  • FleetVixen.Ai.Perception.Tests
  • IPerceptionGovernorVixen.Ai.Perception
  • OverlayFixtureVixen.Ai.Diagnostics.Tests
  • PatrolChaseGiveUpTestsVixen.Ai.Nodes.Tests
  • PerceptionCostTestsVixen.Ai.Perception.Tests
  • PerceptionLibraryVixen.Ai.Perception
  • PerceptionSnapshotsVixen.Ai.Perception
  • PerceptionSystemVixen.Ai.Perception
  • ScheduleTestsVixen.Ai.Perception.Tests
  • SeamTestsVixen.Ai.Nodes.Tests
  • SightOcclusionTestsVixen.Ai.Perception.Tests
  • SightTestsVixen.Ai.Perception.Tests
  • VillageVixen.Ai.Nodes.Tests