Add NavigationLink helper functions for global positions

Adds helper functions to set the links start and end position with global positions or get them as global positions.

Adds global start and end position for the navigation link to the 'link_reached' signal of NavigationAgent. That signal gets emitted when a navigation link waypoint is reached. Requires that 'owner' meta data is enabled on the NavigationAgent.
This commit is contained in:
smix8 2023-02-13 13:18:13 +01:00
parent b7723a01d9
commit d87f124768
10 changed files with 176 additions and 0 deletions

View file

@ -10,6 +10,18 @@
<link title="Using NavigationLinks">$DOCS_URL/tutorials/navigation/navigation_using_navigationlinks.html</link>
</tutorials>
<methods>
<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>
<method name="get_navigation_layer_value" qualifiers="const">
<return type="bool" />
<param index="0" name="layer_number" type="int" />
@ -17,6 +29,20 @@
Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32.
</description>
</method>
<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>
<method name="set_navigation_layer_value">
<return type="void" />
<param index="0" name="layer_number" type="int" />