Creates a link between two positions that [NavigationServer2D] can route agents through.
Creates a link between two positions that [NavigationServer2D] can route agents through. Links can be used to express navigation methods that aren't just traveling along the surface of the navigation mesh, like zip-lines, teleporters, or jumping across gaps.
$DOCS_URL/tutorials/navigation/navigation_using_navigationlinks.html
Returns the [member end_position] that is relative to the link as a global position.
Returns the [member start_position] that is relative to the link as a global position.
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [param layer_number] between 1 and 32.
Sets the [member end_position] that is relative to the link from a global [param position].
Sets the [member start_position] that is relative to the link from a global [param position].
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.
- Whether this link can be traveled in both directions or only from [member start_position] to [member end_position].
- Whether this link is currently active. If [code]false[/code], [method NavigationServer2D.map_get_path] will ignore this link.
- 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 NavigationServer2D.map_set_link_connection_radius].
- 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.
- A bitfield determining all navigation layers the link belongs to. These navigation layers will be checked when requesting a path with [method NavigationServer2D.map_get_path].
- 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 NavigationServer2D.map_set_link_connection_radius].
- When pathfinding moves along the link the traveled distance is multiplied with [member travel_cost] for determining the shortest path.