public static class WorldQueryTestsThe query generators and tests that need the world.
Remarks
Five of doc 37 § P8's seven tests and one of its seven generators. They are here rather than in Vixen.Ai for the reason the rest of this assembly is: a trace needs PhysicsWorld, a path needs NavMeshQuery, and knowing where an entity is needs LocalTransform — none of which the planners may see.
⚠ Every one of them is expensive per point, and that is the whole reason Filter exists and why test order is the author's. A four-hundred-point grid with a trace at the top of the list is four hundred raycasts; the same list with a distance filter first is a few dozen. The runtime does not reorder — a query whose cost depended on a heuristic nobody can see would be one nobody could budget.
Methods (5)
public static IQueryTest Trace(PhysicsWorld physics, TraceEnds ends = PointToContext, float height = 1.7, PhysicsLayerMask? blockers = null)Whether a physics ray between two points is clear, as 1 or 0.
public static IQueryTest Overlap(PhysicsWorld physics, float radius = 1, float height = 0.5, PhysicsLayerMask? layers = null)How many bodies are within a radius of the point.
public static IQueryTest PathLength(NavMeshQuery query, int budget = 256)How far the agent would actually walk to reach the point, over the navmesh.
public static IQueryTest OnNavMesh(NavMeshQuery query)How far the point is off the navmesh, in metres. Anywhere unreachable filters.
public static IQueryGenerator Entities<T>(float radius = 0)Points at every entity carrying a component.
Used by (1)
- WorldQueryTestsVixen.Ai.Nodes.Tests