Skip to content

Navmesh Surface

Updated

The scene’s walkable navmesh that agents find paths on.

Type
comp-navmesh-surface
Script class
NavMeshSurfaceComponent
Per entity
One
Version
1.2.0

Read about it in Navigation meshes: what it does, how to use it from a script, and examples.

The props the runtime declares for this component, with their defaults and accepted ranges.

Prop Default Range
agentHeight 0.30000000000000004 ≤ x ≤ 10
agentMaxClimb 0 ≤ x ≤ 10
agentMaxSlope 0.1 ≤ x ≤ 89.999
agentRadius 0 ≤ x ≤ 5
cellHeight 0.1 ≤ x ≤ 1
cellSize 0.1 ≤ x ≤ 10
detailSampleDist 0 ≤ x ≤ 16
detailSampleMaxError 0 ≤ x ≤ 16
edgeMaxError 0 ≤ x ≤ 3
edgeMaxLen 0 ≤ x ≤ 50
regionMergeSize 0 ≤ x ≤ 150
regionMinSize 0 ≤ x ≤ 150
vertsPerPoly 3 ≤ x ≤ 6, integer

Run it in the browser, read its scripts, and download it as an XR Creator project.

#pragma lifecycle(startup)
function startup() {
const component = self.parent.getComponent(NavMeshSurfaceComponent);
if (component) log(component.props);
}