Class OffMeshLinks

Public

Manager for off-mesh links.

This manager tracks all active off-mesh links in the scene and recalculates them when needed. If an off-mesh link is activated, a LinkGraph will also be added to the graph list to store the special nodes necessary for the links to work.

Whenever a graph update happens, the DirtyBounds method should be called with the bounds of the updated area. This will cause the links touching that bounding box to be recalculated at the end of the graph update step.

Typically you will not need to interact with this class yourself, instead you can use the pre-built components like NodeLink2.

Inner Types

The start or end point of an off-mesh link.

Information about an off-mesh link.

Public Methods

Add (link)

Adds a new off-mesh link.

Get all graphs that this link is connected to.

Dirty (link)

Mark a link as dirty.

DirtyBounds (bounds)

Mark links touching the given bounds as dirty.

GetNearest (point, maxDistance)

Get the nearest link to a point.

Remove (link)

Removes an existing off-mesh link.

Public Enums

Directionality

Determines how a link is connected in the graph.

Public
OffMeshLinkStatus
Public

Private/Protected Members

ClampSegment (anchor, graphMask, maxSnappingDistance, result, nodes)
Refresh ()
astar
Private
cachedNNConstraint
Private
pendingAdd
Private
tree
Private
updateScheduled
Private