Vixen
c7401864
csharp
public struct AiStimuliSource

An entity that can be noticed.

Read the guide page for this →

As a scene component

Size
16 bytes — 585 rows in a 16 KB chunk, alone on the archetype

Remarks

⚠ Perceivability is opt-in, and that is the first of doc 37 § D15's three bounds. A level has tens of thousands of entities and a handful of them are worth looking for. A perception pass that scanned everything with a transform would be a pass whose cost is the level's size rather than the number of things that matter, and no amount of broad phase fixes that — the broad phase is over these.

Scene-placeable, unlike AiPerception: every field here is authored, so a designer marks the player, the guards and the noisy machinery in the level editor.

Fields and properties (5)

  • public SenseMask Senses

    Which senses can find it. None is how a disguise works.

  • public byte Team

    Which side it is on.

  • public float Strength

    How strongly it registers. Scales a noise's range and rides along on every report.

  • public float Height

    Where the perceivable point is above its position, in metres.

  • public bool Enabled

    Whether it registers at all. A corpse or a despawning pickup sets it false.

Methods (1)

Used by (8)

  • FleetVixen.Ai.Perception.Tests
  • PatrolChaseGiveUpTestsVixen.Ai.Nodes.Tests
  • PerceptionSystemVixen.Ai.Perception
  • ScheduleTestsVixen.Ai.Perception.Tests
  • SeamTestsVixen.Ai.Nodes.Tests
  • TypeRegistrationVixen.Ai.Perception
  • VillageVixen.Ai.Nodes.Tests
  • Vixen_Ai_Perception_Ecs_AiStimuliSourceSerializerVixen.Ai.Perception