Skip to main content

NavMesh Sensor

The NavMesh Sensor is a simple component that can detect certain features in a Unity NavMesh. It's a simple wrapper around the built-in navmesh functions: NavMesh.Raycast, NavMesh.FindClosestEdge and NavMesh.SamplePosition. It doesn't detect Signals and therefore it's not derived from Sensor.


This Nav Mesh sensor is configured to find the nearest edge in the nav mesh

Output

In any of it's modes the sensor will detect a single RayHit, which is a Point and a Normal.

Configuration

Test

Specify which navmesh function to use:

  • Ray - Will use NavMesh.Raycast
  • Sample - Will use NavMesh.Sample
  • Closest Edge - Will use NavMesh.ClosestEdge

In all cases the resulting data can be retreived with the GetObstructionRayHit() method.

Area Mask

Specify the navmesh area mask to test on.

API

API page