Skip to content

Api > NavMesh > AddLink()


NavMesh.AddLink(NavMeshLinkData link, Vector3 position, Quaternion rotation)⚓︎

Adds a link to the NavMesh. The link is described by the NavMeshLinkData struct. Returns an instance for the added link.

Parameters:⚓︎

Name Type Description
link NavMeshLinkData Describing the properties of the link.
position Vector3 Translate the link to this position.
rotation Quaternion Rotate the link to this orientation.

Returns:⚓︎

type Description
NavMeshLinkInstance Representing the added link.

Usage⚓︎

---@type NavMeshLinkData
local link;

---@type Vector3
local position;

---@type Quaternion
local rotation;


local val0 = NavMesh:AddLink(link, position, rotation)

Extra Detail⚓︎

This function is similar to AddLink above, but the position and rotation specified is applied to the start and end positions of the link. The rotation also specifies the local up-axis of the link.