public static class WorldSensorsThe sensors that need to know where things are.
Remarks
doc 37 § D13's four kinds, given the two implementations apiece that need a transform or a navmesh — which is why they are here and not in Vixen.Ai. The shipped ones there are delegates and constants; these are the shapes a project reaches for first and would otherwise write itself.
⚠ A global sensor gets one foreach over the world and a local one gets a foreach per agent, and that is the whole of § D13. "Where is the town square" is one query for a thousand villagers; "which apple is nearest me" is a thousand. Both are here so the difference is a thing an author picks rather than a thing they discover.
Methods (5)
public static ITargetSensor Nearest<T>(float range = 0)The nearest entity carrying a component, to this agent.
public static ILocalWorldSensor DistanceToNearest<T>(float far = 1000)How far the agent is from the nearest entity carrying a component, in metres.
public static IGlobalTargetSensor CentreOf<T>()The centre of every entity carrying a component — a crowd's middle, a fire's front.
public static IGlobalWorldSensor CountOf<T>()How many entities carry a component.
public static ITargetSensor NearestOnNavMesh(NavMeshQuery query)The nearest point on the navmesh to where the agent is standing.
Used by (2)
- SeamTestsVixen.Ai.Nodes.Tests
- VillageVixen.Ai.Nodes.Tests