Skip to content

Navmesh Agent

Updated

Moves the entity along navmesh paths.

Type
comp-navmesh-agent
Script class
NavMeshAgentComponent
Per entity
One
Version
1.1.0

Read about it in NavMesh Agents: 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
height 0.001 ≤ x ≤ 10
radius 0 ≤ x ≤ 1
speed 0 ≤ x ≤ 1000

Sent to the entity’s Signal Emitter as { entityId, eventType, data }. Compare eventType with the EventType constants.

  • NavMeshAgent::arrive

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(NavMeshAgentComponent);
if (component) log(component.props);
}