Vixen
02b45cc4
csharp
public sealed class NavQueryFilter

Which polygons a query may cross, and what crossing each one costs.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Two independent decisions. IncludeFlags and ExcludeFlags are a yes-or-no test on capability; the area cost table is a multiplier on distance for the polygons that passed it. Making an area unwalkable by giving it a huge cost is the thing this shape exists to prevent — A* would still search through it, at length, and would still return a path across it if there were no other.

A filter is a plain object with no state of its own beyond those three, so one per agent type is the intended usage: build it once, hand the same instance to every query. Nothing here allocates once it is constructed.

Fields and properties (3)

  • public NavPolyFlags IncludeFlags

    A polygon is considered only if it carries at least one of these.

  • public NavPolyFlags ExcludeFlags

    A polygon carrying any of these is never considered.

  • public static NavQueryFilter Default

    The default filter: everything except Disabled, cost 1.

Methods (4)

  • public NavQueryFilter()

    A filter that accepts every enabled polygon at its natural cost.

  • public float GetAreaCost(int area)

    Reads an area's cost multiplier.

  • public void SetAreaCost(int area, float cost)

    Sets an area's cost multiplier.

  • public bool Passes(NavPolyFlags flags)

    Whether a polygon may be crossed.

Used by (26)

  • PathQueueBenchmarksVixen.Benchmarks.Navigation
  • QueryBenchmarksVixen.Benchmarks.Navigation
  • CrossTileConnectionTestsVixen.Navigation.Tests
  • CrowdVixen.Navigation
  • CrowdRetargetTestsVixen.Navigation.Tests
  • CrowdTestsVixen.Navigation.Tests
  • DetailMeshTestsVixen.Navigation.Tests
  • HeightfieldTestsVixen.Navigation.Tests
  • NavAreaVolumeTestsVixen.Navigation.Tests
  • NavMeshAssetTestsVixen.Navigation.Tests
  • NavMeshBakeTestsVixen.Navigation.Tests
  • NavMeshDebugDrawVixen.Navigation
  • NavMeshDebugDrawTestsVixen.Navigation.Tests
  • NavMeshQueryVixen.Navigation
  • NavMeshQueryTestsVixen.Navigation.Tests
  • NavPathQueueVixen.Navigation
  • NavPathQueueJobTestsVixen.Navigation.Tests
  • NavPathQueueTestsVixen.Navigation.Tests
  • NavTileCacheTestsVixen.Navigation.Tests
  • NavigationAllocationTestsVixen.Navigation.Tests
  • OffMeshConnectionTestsVixen.Navigation.Tests
  • PathCorridorVixen.Navigation
  • RegionMergeTestsVixen.Navigation.Tests
  • SlotVixen.Navigation
  • WatershedTestsVixen.Navigation.Tests
  • NavMeshImporterTestsVixen.Editor.Assets.Tests