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

Allows the specification of an area name to be used in association with Unity's NavMesh Areas feature.
For more information, see Unity's documentation on NavMesh Areas.
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 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.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon