2022-01-30 23:39:52 +00:00
<?xml version="1.0" encoding="UTF-8" ?>
2023-03-01 00:44:37 +00:00
<class name= "NavigationLink3D" inherits= "Node3D" is_experimental= "true" version= "4.1" xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation= "../class.xsd" >
2022-01-30 23:39:52 +00:00
<brief_description >
2023-04-28 20:59:03 +00:00
A link between two positions on [NavigationRegion3D]s that agents can be routed through.
2022-01-30 23:39:52 +00:00
</brief_description>
<description >
2023-04-28 20:59:03 +00:00
A link between two positions on [NavigationRegion3D]s 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.
2022-01-30 23:39:52 +00:00
</description>
<tutorials >
2023-01-11 05:05:04 +00:00
<link title= "Using NavigationLinks" > $DOCS_URL/tutorials/navigation/navigation_using_navigationlinks.html</link>
2022-01-30 23:39:52 +00:00
</tutorials>
<methods >
2023-02-13 12:18:13 +00:00
<method name= "get_global_end_position" qualifiers= "const" >
<return type= "Vector3" />
<description >
Returns the [member end_position] that is relative to the link as a global position.
</description>
</method>
<method name= "get_global_start_position" qualifiers= "const" >
<return type= "Vector3" />
<description >
Returns the [member start_position] that is relative to the link as a global position.
</description>
</method>
2022-01-30 23:39:52 +00:00
<method name= "get_navigation_layer_value" qualifiers= "const" >
<return type= "bool" />
<param index= "0" name= "layer_number" type= "int" />
<description >
2023-04-26 19:36:04 +00:00
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
2022-01-30 23:39:52 +00:00
</description>
</method>
2023-02-13 12:18:13 +00:00
<method name= "set_global_end_position" >
<return type= "void" />
<param index= "0" name= "position" type= "Vector3" />
<description >
Sets the [member end_position] that is relative to the link from a global [param position].
</description>
</method>
<method name= "set_global_start_position" >
<return type= "void" />
<param index= "0" name= "position" type= "Vector3" />
<description >
Sets the [member start_position] that is relative to the link from a global [param position].
</description>
</method>
2022-01-30 23:39:52 +00:00
<method name= "set_navigation_layer_value" >
<return type= "void" />
<param index= "0" name= "layer_number" type= "int" />
<param index= "1" name= "value" type= "bool" />
<description >
2023-04-26 19:36:04 +00:00
Based on [param value], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [param layer_number] between 1 and 32.
2022-01-30 23:39:52 +00:00
</description>
</method>
</methods>
<members >
<member name= "bidirectional" type= "bool" setter= "set_bidirectional" getter= "is_bidirectional" default= "true" >
2022-12-06 22:32:11 +00:00
Whether this link can be traveled in both directions or only from [member start_position] to [member end_position].
2022-01-30 23:39:52 +00:00
</member>
<member name= "enabled" type= "bool" setter= "set_enabled" getter= "is_enabled" default= "true" >
Whether this link is currently active. If [code]false[/code], [method NavigationServer3D.map_get_path] will ignore this link.
</member>
2022-12-06 22:32:11 +00:00
<member name= "end_position" type= "Vector3" setter= "set_end_position" getter= "get_end_position" default= "Vector3(0, 0, 0)" >
2022-01-30 23:39:52 +00:00
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 [method NavigationServer3D.map_set_link_connection_radius].
</member>
<member name= "enter_cost" type= "float" setter= "set_enter_cost" getter= "get_enter_cost" default= "0.0" >
2023-04-26 19:36:04 +00:00
When pathfinding enters this link from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path.
2022-01-30 23:39:52 +00:00
</member>
<member name= "navigation_layers" type= "int" setter= "set_navigation_layers" getter= "get_navigation_layers" default= "1" >
A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer3D.map_get_path].
</member>
2022-12-06 22:32:11 +00:00
<member name= "start_position" type= "Vector3" setter= "set_start_position" getter= "get_start_position" default= "Vector3(0, 0, 0)" >
2022-01-30 23:39:52 +00:00
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 [method NavigationServer3D.map_set_link_connection_radius].
</member>
<member name= "travel_cost" type= "float" setter= "set_travel_cost" getter= "get_travel_cost" default= "1.0" >
2023-04-26 19:36:04 +00:00
When pathfinding moves along the link the traveled distance is multiplied with [member travel_cost] for determining the shortest path.
2022-01-30 23:39:52 +00:00
</member>
</members>
</class>