Skip to main content

NavMesh.AddNavMeshData(NavMeshData navMeshData, Vector3 position, Quaternion rotation)

Adds the specified NavMeshData to the game.

Parameters:

NameTypeDescription
navMeshDataNavMeshDataContains the data for the navmesh.
positionVector3Translate the navmesh to this position.
rotationQuaternionRotate the navmesh to this orientation.

Returns:

typeDescription
NavMeshDataInstanceRepresenting the added navmesh.

Usage

---@type NavMeshData
local navMeshData;

---@type Vector3
local position;

---@type Quaternion
local rotation;


local val0 = NavMesh:AddNavMeshData(navMeshData, position, rotation)

Extra Detail

This function is similar to AddNavMeshData above, but the position and rotation specified is applied in addition to the position and rotation where the NavMesh data was baked.