API reference
API reference
Select your platform
No SDKs available
No versions available

NavMeshSurface Class

Extends MonoBehaviour, ISurface
Encapsulating class that wraps a Unity navigation mesh as an ISurface for use in Interaction SDK logic (comparable to how ColliderSurface wraps a Unity Collider).
NavMeshSurface is primarily used in locomotion scenarios to allow an entire floorspace to be navigated as a single large interactable.

Properties

The default distance, in world space, across which targeting should "snap" to the navigation mesh.
Functionally, this value works as a constant addition to the maxDistance argument of ClosestSurfacePoint(in Vector3, out SurfaceHit, float).
Used in internal traversal calculations; making this value larger may reduce compute costs when dealing with large-scale locomotion, but at the cost of precision.
Determines whether normals on hit calculations are calculated robustly or just assumed to be the world-space up vector.
Since most navigation meshes are flat, typical usage should this setting as false (the default).

Fields

Implementation of ISurface.Transform; for details, please refer to the related documentation provided for that property.

Protected Fields

bool _started[Get]

Protected Functions

virtual void Start ( )

Member Functions

Implementation of ISurface.ClosestSurfacePoint(in Vector3, out SurfaceHit, float); for details, please refer to the related documentation provided for that property.
Implementation of ISurface.Raycast(in Ray, out SurfaceHit, float); for details, please refer to the related documentation provided for that property.
void InjectOptionalAreaName
( string areaName )
void InjectOptionalAgentIndex
( int agentIndex )
Did you find this page helpful?
Thumbs up icon
Thumbs down icon