NavigationLink3D
A link between two positions on NavigationRegion3Ds that agents can be routed through.
A link between two positions on NavigationRegion3Ds that agents can be routed through.
A link between two positions on NavigationRegion3Ds that agents can be routed through. These positions can be on the same NavigationRegion3D or on two different ones. Links are useful to express navigation methods other than traveling along the surface of the navigation mesh, such as ziplines, teleporters, or gaps that can be jumped across.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
NavigationLink3DConstructor
public NavigationLink3D();Properties7
BidirectionalProperty
public bool Bidirectional { get; set; }Whether this link can be traveled in both directions or only from NavigationLink3D.StartPosition to NavigationLink3D.EndPosition.
EnabledProperty
public bool Enabled { get; set; }Whether this link is currently active. If false, NavigationServer3D.MapGetPath will ignore this link.
EndPositionProperty
public Vector3 EndPosition { get; set; }Ending position of the link.
This position will search out the nearest polygon in the navigation mesh to attach to.
The distance the link will search is controlled by NavigationServer3D.MapSetLinkConnectionRadius.
EnterCostProperty
public float EnterCost { get; set; }When pathfinding enters this link from another region's navigation mesh the NavigationLink3D.EnterCost value is added to the path distance for determining the shortest path.
NavigationLayersProperty
public uint NavigationLayers { get; set; }A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with NavigationServer3D.MapGetPath.
StartPositionProperty
public Vector3 StartPosition { get; set; }Starting position of the link.
This position will search out the nearest polygon in the navigation mesh to attach to.
The distance the link will search is controlled by NavigationServer3D.MapSetLinkConnectionRadius.
TravelCostProperty
public float TravelCost { get; set; }When pathfinding moves along the link the traveled distance is multiplied with NavigationLink3D.TravelCost for determining the shortest path.
Methods23
GetEndPositionVector3
public Vector3 GetEndPosition();Vector3GetEnterCostfloat
public float GetEnterCost();floatGetGlobalEndPositionVector3
public Vector3 GetGlobalEndPosition();Returns the NavigationLink3D.EndPosition that is relative to the link as a global position.
Vector3GetGlobalStartPositionVector3
public Vector3 GetGlobalStartPosition();Returns the NavigationLink3D.StartPosition that is relative to the link as a global position.
Vector3GetNavigationLayerValuebool
public bool GetNavigationLayerValue(int layerNumber);Returns whether or not the specified layer of the NavigationLink3D.NavigationLayers bitmask is enabled, given a layer_number between 1 and 32.
| Name | Type | Default |
|---|---|---|
layerNumber | int | — |
boolGetNavigationLayersuint
public uint GetNavigationLayers();uintGetNavigationMapRid
public Rid GetNavigationMap();Returns the current navigation map Rid used by this link.
RidGetRidRid
public Rid GetRid();Returns the Rid of this link on the NavigationServer3D.
RidGetStartPositionVector3
public Vector3 GetStartPosition();Vector3GetTravelCostfloat
public float GetTravelCost();floatIsBidirectionalbool
public bool IsBidirectional();boolIsEnabledbool
public bool IsEnabled();boolSetBidirectionalvoid
public void SetBidirectional(bool bidirectional);| Name | Type | Default |
|---|---|---|
bidirectional | bool | — |
SetEnabledvoid
public void SetEnabled(bool enabled);| Name | Type | Default |
|---|---|---|
enabled | bool | — |
SetEndPositionvoid
public void SetEndPosition(Vector3 position);| Name | Type | Default |
|---|---|---|
position | Vector3 | — |
SetEnterCostvoid
public void SetEnterCost(float enterCost);| Name | Type | Default |
|---|---|---|
enterCost | float | — |
SetGlobalEndPositionvoid
public void SetGlobalEndPosition(Vector3 position);Sets the NavigationLink3D.EndPosition that is relative to the link from a global position.
| Name | Type | Default |
|---|---|---|
position | Vector3 | — |
SetGlobalStartPositionvoid
public void SetGlobalStartPosition(Vector3 position);Sets the NavigationLink3D.StartPosition that is relative to the link from a global position.
| Name | Type | Default |
|---|---|---|
position | Vector3 | — |
SetNavigationLayerValuevoid
public void SetNavigationLayerValue(int layerNumber, bool value);Based on value, enables or disables the specified layer in the NavigationLink3D.NavigationLayers bitmask, given a layer_number between 1 and 32.
| Name | Type | Default |
|---|---|---|
layerNumber | int | — |
value | bool | — |
SetNavigationLayersvoid
public void SetNavigationLayers(uint navigationLayers);| Name | Type | Default |
|---|---|---|
navigationLayers | uint | — |
SetNavigationMapvoid
public void SetNavigationMap(Rid navigationMap);Sets the Rid of the navigation map this link should use. By default the link will automatically join the World3D default navigation map so this function is only required to override the default map.
| Name | Type | Default |
|---|---|---|
navigationMap | Rid | — |
SetStartPositionvoid
public void SetStartPosition(Vector3 position);| Name | Type | Default |
|---|---|---|
position | Vector3 | — |
SetTravelCostvoid
public void SetTravelCost(float travelCost);| Name | Type | Default |
|---|---|---|
travelCost | float | — |