public record class SightSettingsWhat being able to see means for one kind of agent.
Remarks
⚠ LoseSightRadius is a separate, larger radius, and leaving it out makes targets flicker. With one radius, a target walking the boundary is perceived, lost, perceived, lost — several times a second — and every decorator observing the target key aborts a branch each time. It is the first thing every hand-rolled implementation gets wrong, it looks like a bug in the behaviour tree rather than in the sense, and it costs one field. doc 37 § D15.
The three tests run in a fixed order and the order is the cost model: radius first, cone second, occlusion last — the trace is a physics raycast and it only ever runs for what survived two comparisons.
Fields and properties (6)
public float RadiusHow far it can notice something, in metres.
public float LoseSightRadiusHow far something already seen can get before it is lost. Clamped up to Radius, because a smaller one is the flicker with extra steps.
public float ConeDegreesThe full angle of the cone, in degrees. 360 is all round.
public bool OcclusionWhether something solid in the way stops it.
public float EyeHeightWhere the eye is above the entity's own position, in metres.
public float ConeCosineThe cosine of the half-angle, which is what a dot product is compared against.
Methods (1)
public float RadiusFor(bool perceived)The effective radius for something that is already perceived.
Used by (8)
- AiGameplayDebuggerVixen.Ai.Diagnostics
- FleetVixen.Ai.Perception.Tests
- PatrolChaseGiveUpTestsVixen.Ai.Nodes.Tests
- PerceptionConfigVixen.Ai.Perception
- PerceptionSystemVixen.Ai.Perception
- SightOcclusionTestsVixen.Ai.Perception.Tests
- SightTestsVixen.Ai.Perception.Tests
- VillageVixen.Ai.Nodes.Tests