classref: Sync with current master branch (fc1c25d29)

This commit is contained in:
Rémi Verschelde
2022-11-07 14:06:01 +01:00
parent d09033677f
commit 263e4d6224
196 changed files with 5055 additions and 3075 deletions

View File

@@ -19,36 +19,38 @@ Description
3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. ``NavigationAgent3D`` is physics safe.
\ **Note:** After :ref:`set_target_location<class_NavigationAgent3D_method_set_target_location>` is used it is required to use the :ref:`get_next_location<class_NavigationAgent3D_method_get_next_location>` function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
\ **Note:** After setting :ref:`target_location<class_NavigationAgent3D_property_target_location>` it is required to use the :ref:`get_next_location<class_NavigationAgent3D_method_get_next_location>` function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node.
Properties
----------
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`agent_height_offset<class_NavigationAgent3D_property_agent_height_offset>` | ``0.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationAgent3D_property_avoidance_enabled>` | ``false`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`bool<class_bool>` | :ref:`ignore_y<class_NavigationAgent3D_property_ignore_y>` | ``true`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`max_neighbors<class_NavigationAgent3D_property_max_neighbors>` | ``10`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`max_speed<class_NavigationAgent3D_property_max_speed>` | ``10.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`int<class_int>` | :ref:`navigation_layers<class_NavigationAgent3D_property_navigation_layers>` | ``1`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`neighbor_distance<class_NavigationAgent3D_property_neighbor_distance>` | ``50.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`path_desired_distance<class_NavigationAgent3D_property_path_desired_distance>` | ``1.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`path_max_distance<class_NavigationAgent3D_property_path_max_distance>` | ``3.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`radius<class_NavigationAgent3D_property_radius>` | ``1.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`target_desired_distance<class_NavigationAgent3D_property_target_desired_distance>` | ``1.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`time_horizon<class_NavigationAgent3D_property_time_horizon>` | ``5.0`` |
+---------------------------+------------------------------------------------------------------------------------------+-----------+
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`float<class_float>` | :ref:`agent_height_offset<class_NavigationAgent3D_property_agent_height_offset>` | ``0.0`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationAgent3D_property_avoidance_enabled>` | ``false`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`bool<class_bool>` | :ref:`ignore_y<class_NavigationAgent3D_property_ignore_y>` | ``true`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`int<class_int>` | :ref:`max_neighbors<class_NavigationAgent3D_property_max_neighbors>` | ``10`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`float<class_float>` | :ref:`max_speed<class_NavigationAgent3D_property_max_speed>` | ``10.0`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`int<class_int>` | :ref:`navigation_layers<class_NavigationAgent3D_property_navigation_layers>` | ``1`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`float<class_float>` | :ref:`neighbor_distance<class_NavigationAgent3D_property_neighbor_distance>` | ``50.0`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`float<class_float>` | :ref:`path_desired_distance<class_NavigationAgent3D_property_path_desired_distance>` | ``1.0`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`float<class_float>` | :ref:`path_max_distance<class_NavigationAgent3D_property_path_max_distance>` | ``3.0`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`float<class_float>` | :ref:`radius<class_NavigationAgent3D_property_radius>` | ``1.0`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`float<class_float>` | :ref:`target_desired_distance<class_NavigationAgent3D_property_target_desired_distance>` | ``1.0`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`target_location<class_NavigationAgent3D_property_target_location>` | ``Vector3(0, 0, 0)`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
| :ref:`float<class_float>` | :ref:`time_horizon<class_NavigationAgent3D_property_time_horizon>` | ``5.0`` |
+-------------------------------+------------------------------------------------------------------------------------------+----------------------+
Methods
-------
@@ -70,8 +72,6 @@ Methods
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationAgent3D_method_get_rid>` **(** **)** |const| |
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Vector3<class_Vector3>` | :ref:`get_target_location<class_NavigationAgent3D_method_get_target_location>` **(** **)** |const| |
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_navigation_finished<class_NavigationAgent3D_method_is_navigation_finished>` **(** **)** |
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_target_reachable<class_NavigationAgent3D_method_is_target_reachable>` **(** **)** |
@@ -82,8 +82,6 @@ Methods
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_navigation_map<class_NavigationAgent3D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** |
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_target_location<class_NavigationAgent3D_method_set_target_location>` **(** :ref:`Vector3<class_Vector3>` location **)** |
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| void | :ref:`set_velocity<class_NavigationAgent3D_method_set_velocity>` **(** :ref:`Vector3<class_Vector3>` velocity **)** |
+-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
@@ -110,7 +108,7 @@ Notifies when the navigation path changes.
- **target_reached** **(** **)**
Notifies when the player defined target, set with :ref:`set_target_location<class_NavigationAgent3D_method_set_target_location>`, is reached.
Notifies when the player-defined :ref:`target_location<class_NavigationAgent3D_property_target_location>` is reached.
----
@@ -301,6 +299,22 @@ The distance threshold before the final target point is considered to be reached
----
.. _class_NavigationAgent3D_property_target_location:
- :ref:`Vector3<class_Vector3>` **target_location**
+-----------+----------------------------+
| *Default* | ``Vector3(0, 0, 0)`` |
+-----------+----------------------------+
| *Setter* | set_target_location(value) |
+-----------+----------------------------+
| *Getter* | get_target_location() |
+-----------+----------------------------+
The user-defined target location. Setting this property will clear the current navigation path.
----
.. _class_NavigationAgent3D_property_time_horizon:
- :ref:`float<class_float>` **time_horizon**
@@ -322,7 +336,7 @@ Method Descriptions
- :ref:`float<class_float>` **distance_to_target** **(** **)** |const|
Returns the distance to the target location, using the agent's global position. The user must set the target location with :ref:`set_target_location<class_NavigationAgent3D_method_set_target_location>` in order for this to be accurate.
Returns the distance to the target location, using the agent's global position. The user must set :ref:`target_location<class_NavigationAgent3D_property_target_location>` in order for this to be accurate.
----
@@ -382,14 +396,6 @@ Returns the :ref:`RID<class_RID>` of this agent on the :ref:`NavigationServer3D<
----
.. _class_NavigationAgent3D_method_get_target_location:
- :ref:`Vector3<class_Vector3>` **get_target_location** **(** **)** |const|
Returns the user defined :ref:`Vector3<class_Vector3>` after setting the target location.
----
.. _class_NavigationAgent3D_method_is_navigation_finished:
- :ref:`bool<class_bool>` **is_navigation_finished** **(** **)**
@@ -402,7 +408,7 @@ Returns true if the navigation path's final location has been reached.
- :ref:`bool<class_bool>` **is_target_reachable** **(** **)**
Returns true if the target location is reachable. The target location is set using :ref:`set_target_location<class_NavigationAgent3D_method_set_target_location>`.
Returns true if :ref:`target_location<class_NavigationAgent3D_property_target_location>` is reachable.
----
@@ -410,7 +416,7 @@ Returns true if the target location is reachable. The target location is set usi
- :ref:`bool<class_bool>` **is_target_reached** **(** **)** |const|
Returns true if the target location is reached. The target location is set using :ref:`set_target_location<class_NavigationAgent3D_method_set_target_location>`. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See :ref:`get_final_location<class_NavigationAgent3D_method_get_final_location>`.
Returns true if :ref:`target_location<class_NavigationAgent3D_property_target_location>` is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See :ref:`get_final_location<class_NavigationAgent3D_method_get_final_location>`.
----
@@ -430,14 +436,6 @@ Sets the :ref:`RID<class_RID>` of the navigation map this NavigationAgent node s
----
.. _class_NavigationAgent3D_method_set_target_location:
- void **set_target_location** **(** :ref:`Vector3<class_Vector3>` location **)**
Sets the user desired final location. This will clear the current navigation path.
----
.. _class_NavigationAgent3D_method_set_velocity:
- void **set_velocity** **(** :ref:`Vector3<class_Vector3>` velocity **)**