Add detail to NavigationAgent signal descriptions

Adds detail to NavigationAgent signal descriptions.
This commit is contained in:
smix8 2023-07-13 00:06:45 +02:00
parent 202e4b2c1e
commit 99e70ab6ef
2 changed files with 20 additions and 12 deletions

View File

@ -53,7 +53,7 @@
<method name="get_final_position"> <method name="get_final_position">
<return type="Vector2" /> <return type="Vector2" />
<description> <description>
Returns the reachable final position of the current navigation path in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the [signal path_changed] signal.
</description> </description>
</method> </method>
<method name="get_navigation_layer_value" qualifiers="const"> <method name="get_navigation_layer_value" qualifiers="const">
@ -84,13 +84,14 @@
<method name="is_navigation_finished"> <method name="is_navigation_finished">
<return type="bool" /> <return type="bool" />
<description> <description>
Returns true if the navigation path's final position has been reached. Returns [code]true[/code] if the end of the currently loaded navigation path has been reached.
[b]Note:[/b] While true prefer to stop calling update functions like [method get_next_path_position]. This avoids jittering the standing agent due to calling repeated path updates.
</description> </description>
</method> </method>
<method name="is_target_reachable"> <method name="is_target_reachable">
<return type="bool" /> <return type="bool" />
<description> <description>
Returns true if [member target_position] is reachable. The target position is set using [member target_position]. Returns [code]true[/code] if [method get_final_position] is within [member target_desired_distance] of the [member target_position].
</description> </description>
</method> </method>
<method name="is_target_reached" qualifiers="const"> <method name="is_target_reached" qualifiers="const">
@ -229,17 +230,20 @@
</signal> </signal>
<signal name="navigation_finished"> <signal name="navigation_finished">
<description> <description>
Notifies when the final position is reached. Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with [method get_current_navigation_path_index].
</description> </description>
</signal> </signal>
<signal name="path_changed"> <signal name="path_changed">
<description> <description>
Notifies when the navigation path changes. Emitted when the agent had to update the loaded path:
- because path was previously empty.
- because navigation map has changed.
- because agent pushed further away from the current path segment than the [member path_max_distance].
</description> </description>
</signal> </signal>
<signal name="target_reached"> <signal name="target_reached">
<description> <description>
Notifies when the player-defined [member target_position] is reached. Emitted once per loaded path when the agent's global position is the first time within [member target_desired_distance] to the [member target_position].
</description> </description>
</signal> </signal>
<signal name="velocity_computed"> <signal name="velocity_computed">

View File

@ -53,7 +53,7 @@
<method name="get_final_position"> <method name="get_final_position">
<return type="Vector3" /> <return type="Vector3" />
<description> <description>
Returns the reachable final position of the current navigation path in global coordinates. This position can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. Returns the reachable final position of the current navigation path in global coordinates. This position can change if the agent needs to update the navigation path which makes the agent emit the [signal path_changed] signal.
</description> </description>
</method> </method>
<method name="get_navigation_layer_value" qualifiers="const"> <method name="get_navigation_layer_value" qualifiers="const">
@ -84,13 +84,14 @@
<method name="is_navigation_finished"> <method name="is_navigation_finished">
<return type="bool" /> <return type="bool" />
<description> <description>
Returns true if the navigation path's final position has been reached. Returns [code]true[/code] if the end of the currently loaded navigation path has been reached.
[b]Note:[/b] While true prefer to stop calling update functions like [method get_next_path_position]. This avoids jittering the standing agent due to calling repeated path updates.
</description> </description>
</method> </method>
<method name="is_target_reachable"> <method name="is_target_reachable">
<return type="bool" /> <return type="bool" />
<description> <description>
Returns true if [member target_position] is reachable. The target position is set using [member target_position]. Returns [code]true[/code] if [method get_final_position] is within [member target_desired_distance] of the [member target_position].
</description> </description>
</method> </method>
<method name="is_target_reached" qualifiers="const"> <method name="is_target_reached" qualifiers="const">
@ -236,17 +237,20 @@
</signal> </signal>
<signal name="navigation_finished"> <signal name="navigation_finished">
<description> <description>
Notifies when the final position is reached. Emitted once per loaded path when the agent internal navigation path index reaches the last index of the loaded path array. The agent internal navigation path index can be received with [method get_current_navigation_path_index].
</description> </description>
</signal> </signal>
<signal name="path_changed"> <signal name="path_changed">
<description> <description>
Notifies when the navigation path changes. Emitted when the agent had to update the loaded path:
- because path was previously empty.
- because navigation map has changed.
- because agent pushed further away from the current path segment than the [member path_max_distance].
</description> </description>
</signal> </signal>
<signal name="target_reached"> <signal name="target_reached">
<description> <description>
Notifies when the player-defined [member target_position] is reached. Emitted once per loaded path when the agent's global position is the first time within [member target_desired_distance] to the [member target_position].
</description> </description>
</signal> </signal>
<signal name="velocity_computed"> <signal name="velocity_computed">