mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current master branch (2e7fc81)
This commit is contained in:
@@ -73,7 +73,7 @@ Properties
|
||||
+------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+
|
||||
| :ref:`float<class_float>` | :ref:`path_max_distance<class_NavigationAgent2D_property_path_max_distance>` | ``100.0`` |
|
||||
+------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+
|
||||
| |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> | :ref:`path_metadata_flags<class_NavigationAgent2D_property_path_metadata_flags>` | ``7`` |
|
||||
| |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] | :ref:`path_metadata_flags<class_NavigationAgent2D_property_path_metadata_flags>` | ``7`` |
|
||||
+------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+
|
||||
| :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` | :ref:`path_postprocessing<class_NavigationAgent2D_property_path_postprocessing>` | ``0`` |
|
||||
+------------------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-----------------------+
|
||||
@@ -100,45 +100,45 @@ Methods
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`distance_to_target<class_NavigationAgent2D_method_distance_to_target>` **(** **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationAgent2D_method_get_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_avoidance_mask_value<class_NavigationAgent2D_method_get_avoidance_mask_value>` **(** :ref:`int<class_int>` mask_number **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_current_navigation_path<class_NavigationAgent2D_method_get_current_navigation_path>` **(** **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_current_navigation_path_index<class_NavigationAgent2D_method_get_current_navigation_path_index>` **(** **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` | :ref:`get_current_navigation_result<class_NavigationAgent2D_method_get_current_navigation_result>` **(** **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>` **(** **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationAgent2D_method_get_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationAgent2D_method_get_navigation_map>` **(** **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>` **(** **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationAgent2D_method_get_rid>` **(** **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_navigation_finished<class_NavigationAgent2D_method_is_navigation_finished>` **(** **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_target_reachable<class_NavigationAgent2D_method_is_target_reachable>` **(** **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_target_reached<class_NavigationAgent2D_method_is_target_reached>` **(** **)** |const| |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_avoidance_layer_value<class_NavigationAgent2D_method_set_avoidance_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_avoidance_mask_value<class_NavigationAgent2D_method_set_avoidance_mask_value>` **(** :ref:`int<class_int>` mask_number, :ref:`bool<class_bool>` value **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_navigation_layer_value<class_NavigationAgent2D_method_set_navigation_layer_value>` **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| void | :ref:`set_velocity_forced<class_NavigationAgent2D_method_set_velocity_forced>` **(** :ref:`Vector2<class_Vector2>` velocity **)** |
|
||||
+-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`distance_to_target<class_NavigationAgent2D_method_distance_to_target>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_avoidance_layer_value<class_NavigationAgent2D_method_get_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_avoidance_mask_value<class_NavigationAgent2D_method_get_avoidance_mask_value>`\ (\ mask_number\: :ref:`int<class_int>`\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`get_current_navigation_path<class_NavigationAgent2D_method_get_current_navigation_path>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`get_current_navigation_path_index<class_NavigationAgent2D_method_get_current_navigation_path_index>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` | :ref:`get_current_navigation_result<class_NavigationAgent2D_method_get_current_navigation_result>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`\ (\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`get_navigation_layer_value<class_NavigationAgent2D_method_get_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationAgent2D_method_get_navigation_map>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`Vector2<class_Vector2>` | :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>`\ (\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationAgent2D_method_get_rid>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_navigation_finished<class_NavigationAgent2D_method_is_navigation_finished>`\ (\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_target_reachable<class_NavigationAgent2D_method_is_target_reachable>`\ (\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`is_target_reached<class_NavigationAgent2D_method_is_target_reached>`\ (\ ) |const| |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_avoidance_layer_value<class_NavigationAgent2D_method_set_avoidance_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_avoidance_mask_value<class_NavigationAgent2D_method_set_avoidance_mask_value>`\ (\ mask_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_navigation_layer_value<class_NavigationAgent2D_method_set_navigation_layer_value>`\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>`\ (\ navigation_map\: :ref:`RID<class_RID>`\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
| |void| | :ref:`set_velocity_forced<class_NavigationAgent2D_method_set_velocity_forced>`\ (\ velocity\: :ref:`Vector2<class_Vector2>`\ ) |
|
||||
+-----------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||||
|
||||
.. rst-class:: classref-section-separator
|
||||
|
||||
@@ -153,7 +153,7 @@ Signals
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**link_reached** **(** :ref:`Dictionary<class_Dictionary>` details **)**
|
||||
**link_reached**\ (\ details\: :ref:`Dictionary<class_Dictionary>`\ )
|
||||
|
||||
Signals that the agent reached a navigation link. Emitted when the agent moves within :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` of the next position of the path when that position is a navigation link.
|
||||
|
||||
@@ -179,7 +179,7 @@ The details dictionary may contain the following keys depending on the value of
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**navigation_finished** **(** **)**
|
||||
**navigation_finished**\ (\ )
|
||||
|
||||
Signals that the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached. This signal is emitted only once per loaded path.
|
||||
|
||||
@@ -193,7 +193,7 @@ This signal will be emitted just after :ref:`target_reached<class_NavigationAgen
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**path_changed** **(** **)**
|
||||
**path_changed**\ (\ )
|
||||
|
||||
Emitted when the agent had to update the loaded path:
|
||||
|
||||
@@ -211,7 +211,7 @@ Emitted when the agent had to update the loaded path:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**target_reached** **(** **)**
|
||||
**target_reached**\ (\ )
|
||||
|
||||
Signals that the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent2D_property_target_position>`. This signal is emitted only once per loaded path.
|
||||
|
||||
@@ -227,7 +227,7 @@ It may not always be possible to reach the target but it should always be possib
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**velocity_computed** **(** :ref:`Vector2<class_Vector2>` safe_velocity **)**
|
||||
**velocity_computed**\ (\ safe_velocity\: :ref:`Vector2<class_Vector2>`\ )
|
||||
|
||||
Notifies when the collision avoidance velocity is calculated. Emitted when :ref:`velocity<class_NavigationAgent2D_property_velocity>` is set. Only emitted when :ref:`avoidance_enabled<class_NavigationAgent2D_property_avoidance_enabled>` is true.
|
||||
|
||||
@@ -239,7 +239,7 @@ Notifies when the collision avoidance velocity is calculated. Emitted when :ref:
|
||||
|
||||
.. rst-class:: classref-signal
|
||||
|
||||
**waypoint_reached** **(** :ref:`Dictionary<class_Dictionary>` details **)**
|
||||
**waypoint_reached**\ (\ details\: :ref:`Dictionary<class_Dictionary>`\ )
|
||||
|
||||
Signals that the agent reached a waypoint. Emitted when the agent moves within :ref:`path_desired_distance<class_NavigationAgent2D_property_path_desired_distance>` of the next position of the path.
|
||||
|
||||
@@ -270,8 +270,8 @@ Property Descriptions
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_avoidance_enabled** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **get_avoidance_enabled** **(** **)**
|
||||
- |void| **set_avoidance_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **get_avoidance_enabled**\ (\ )
|
||||
|
||||
If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`NavigationServer2D<class_NavigationServer2D>`. When :ref:`velocity<class_NavigationAgent2D_property_velocity>` is used and the processing is completed a ``safe_velocity`` Vector2 is received with a signal connection to :ref:`velocity_computed<class_NavigationAgent2D_signal_velocity_computed>`. Avoidance processing with many registered agents has a significant performance cost and should only be enabled on agents that currently require it.
|
||||
|
||||
@@ -287,8 +287,8 @@ If ``true`` the agent is registered for an RVO avoidance callback on the :ref:`N
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_avoidance_layers** **(** :ref:`int<class_int>` value **)**
|
||||
- :ref:`int<class_int>` **get_avoidance_layers** **(** **)**
|
||||
- |void| **set_avoidance_layers**\ (\ value\: :ref:`int<class_int>`\ )
|
||||
- :ref:`int<class_int>` **get_avoidance_layers**\ (\ )
|
||||
|
||||
A bitfield determining the avoidance layers for this NavigationAgent. Other agents with a matching bit on the :ref:`avoidance_mask<class_NavigationAgent2D_property_avoidance_mask>` will avoid this agent.
|
||||
|
||||
@@ -304,8 +304,8 @@ A bitfield determining the avoidance layers for this NavigationAgent. Other agen
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_avoidance_mask** **(** :ref:`int<class_int>` value **)**
|
||||
- :ref:`int<class_int>` **get_avoidance_mask** **(** **)**
|
||||
- |void| **set_avoidance_mask**\ (\ value\: :ref:`int<class_int>`\ )
|
||||
- :ref:`int<class_int>` **get_avoidance_mask**\ (\ )
|
||||
|
||||
A bitfield determining what other avoidance agents and obstacles this NavigationAgent will avoid when a bit matches at least one of their :ref:`avoidance_layers<class_NavigationAgent2D_property_avoidance_layers>`.
|
||||
|
||||
@@ -321,8 +321,8 @@ A bitfield determining what other avoidance agents and obstacles this Navigation
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_avoidance_priority** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_avoidance_priority** **(** **)**
|
||||
- |void| **set_avoidance_priority**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_avoidance_priority**\ (\ )
|
||||
|
||||
The agent does not adjust the velocity for other agents that would match the :ref:`avoidance_mask<class_NavigationAgent2D_property_avoidance_mask>` but have a lower :ref:`avoidance_priority<class_NavigationAgent2D_property_avoidance_priority>`. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent.
|
||||
|
||||
@@ -338,8 +338,8 @@ The agent does not adjust the velocity for other agents that would match the :re
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_debug_enabled** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **get_debug_enabled** **(** **)**
|
||||
- |void| **set_debug_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **get_debug_enabled**\ (\ )
|
||||
|
||||
If ``true`` shows debug visuals for this agent.
|
||||
|
||||
@@ -355,8 +355,8 @@ If ``true`` shows debug visuals for this agent.
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_debug_path_custom_color** **(** :ref:`Color<class_Color>` value **)**
|
||||
- :ref:`Color<class_Color>` **get_debug_path_custom_color** **(** **)**
|
||||
- |void| **set_debug_path_custom_color**\ (\ value\: :ref:`Color<class_Color>`\ )
|
||||
- :ref:`Color<class_Color>` **get_debug_path_custom_color**\ (\ )
|
||||
|
||||
If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is ``true`` uses this color for this agent instead of global color.
|
||||
|
||||
@@ -372,8 +372,8 @@ If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_debug_path_custom_line_width** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_debug_path_custom_line_width** **(** **)**
|
||||
- |void| **set_debug_path_custom_line_width**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_debug_path_custom_line_width**\ (\ )
|
||||
|
||||
If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is ``true`` uses this line width for rendering paths for this agent instead of global line width.
|
||||
|
||||
@@ -389,8 +389,8 @@ If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_debug_path_custom_point_size** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_debug_path_custom_point_size** **(** **)**
|
||||
- |void| **set_debug_path_custom_point_size**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_debug_path_custom_point_size**\ (\ )
|
||||
|
||||
If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is ``true`` uses this rasterized point size for rendering path points for this agent instead of global point size.
|
||||
|
||||
@@ -406,8 +406,8 @@ If :ref:`debug_use_custom<class_NavigationAgent2D_property_debug_use_custom>` is
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_debug_use_custom** **(** :ref:`bool<class_bool>` value **)**
|
||||
- :ref:`bool<class_bool>` **get_debug_use_custom** **(** **)**
|
||||
- |void| **set_debug_use_custom**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **get_debug_use_custom**\ (\ )
|
||||
|
||||
If ``true`` uses the defined :ref:`debug_path_custom_color<class_NavigationAgent2D_property_debug_path_custom_color>` for this agent instead of global color.
|
||||
|
||||
@@ -423,8 +423,8 @@ If ``true`` uses the defined :ref:`debug_path_custom_color<class_NavigationAgent
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_max_neighbors** **(** :ref:`int<class_int>` value **)**
|
||||
- :ref:`int<class_int>` **get_max_neighbors** **(** **)**
|
||||
- |void| **set_max_neighbors**\ (\ value\: :ref:`int<class_int>`\ )
|
||||
- :ref:`int<class_int>` **get_max_neighbors**\ (\ )
|
||||
|
||||
The maximum number of neighbors for the agent to consider.
|
||||
|
||||
@@ -440,8 +440,8 @@ The maximum number of neighbors for the agent to consider.
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_max_speed** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_max_speed** **(** **)**
|
||||
- |void| **set_max_speed**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_max_speed**\ (\ )
|
||||
|
||||
The maximum speed that an agent can move.
|
||||
|
||||
@@ -457,8 +457,8 @@ The maximum speed that an agent can move.
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_navigation_layers** **(** :ref:`int<class_int>` value **)**
|
||||
- :ref:`int<class_int>` **get_navigation_layers** **(** **)**
|
||||
- |void| **set_navigation_layers**\ (\ value\: :ref:`int<class_int>`\ )
|
||||
- :ref:`int<class_int>` **get_navigation_layers**\ (\ )
|
||||
|
||||
A bitfield determining which navigation layers of navigation regions this agent will use to calculate a path. Changing it during runtime will clear the current navigation path and generate a new one, according to the new navigation layers.
|
||||
|
||||
@@ -474,8 +474,8 @@ A bitfield determining which navigation layers of navigation regions this agent
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_neighbor_distance** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_neighbor_distance** **(** **)**
|
||||
- |void| **set_neighbor_distance**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_neighbor_distance**\ (\ )
|
||||
|
||||
The distance to search for other agents.
|
||||
|
||||
@@ -491,8 +491,8 @@ The distance to search for other agents.
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_path_desired_distance** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_path_desired_distance** **(** **)**
|
||||
- |void| **set_path_desired_distance**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_path_desired_distance**\ (\ )
|
||||
|
||||
The distance threshold before a path point is considered to be reached. This allows agents to not have to hit a path point on the path exactly, but only to reach its general area. If this value is set too high, the NavigationAgent will skip points on the path, which can lead to it leaving the navigation mesh. If this value is set too low, the NavigationAgent will be stuck in a repath loop because it will constantly overshoot the distance to the next point on each physics frame update.
|
||||
|
||||
@@ -508,8 +508,8 @@ The distance threshold before a path point is considered to be reached. This all
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_path_max_distance** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_path_max_distance** **(** **)**
|
||||
- |void| **set_path_max_distance**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_path_max_distance**\ (\ )
|
||||
|
||||
The maximum distance the agent is allowed away from the ideal path to the final position. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path.
|
||||
|
||||
@@ -521,12 +521,12 @@ The maximum distance the agent is allowed away from the ideal path to the final
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
|bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> **path_metadata_flags** = ``7``
|
||||
|bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] **path_metadata_flags** = ``7``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_path_metadata_flags** **(** |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> value **)**
|
||||
- |bitfield|\<:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\> **get_path_metadata_flags** **(** **)**
|
||||
- |void| **set_path_metadata_flags**\ (\ value\: |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\]\ )
|
||||
- |bitfield|\[:ref:`PathMetadataFlags<enum_NavigationPathQueryParameters2D_PathMetadataFlags>`\] **get_path_metadata_flags**\ (\ )
|
||||
|
||||
Additional information to return with the navigation path.
|
||||
|
||||
@@ -542,8 +542,8 @@ Additional information to return with the navigation path.
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_path_postprocessing** **(** :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` value **)**
|
||||
- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **get_path_postprocessing** **(** **)**
|
||||
- |void| **set_path_postprocessing**\ (\ value\: :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>`\ )
|
||||
- :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **get_path_postprocessing**\ (\ )
|
||||
|
||||
The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm<class_NavigationAgent2D_property_pathfinding_algorithm>`.
|
||||
|
||||
@@ -559,8 +559,8 @@ The path postprocessing applied to the raw path corridor found by the :ref:`path
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` value **)**
|
||||
- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **get_pathfinding_algorithm** **(** **)**
|
||||
- |void| **set_pathfinding_algorithm**\ (\ value\: :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>`\ )
|
||||
- :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **get_pathfinding_algorithm**\ (\ )
|
||||
|
||||
The pathfinding algorithm used in the path query.
|
||||
|
||||
@@ -576,8 +576,8 @@ The pathfinding algorithm used in the path query.
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_radius** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_radius** **(** **)**
|
||||
- |void| **set_radius**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_radius**\ (\ )
|
||||
|
||||
The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by :ref:`neighbor_distance<class_NavigationAgent2D_property_neighbor_distance>`).
|
||||
|
||||
@@ -595,8 +595,8 @@ Does not affect normal pathfinding. To change an actor's pathfinding radius bake
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_target_desired_distance** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_target_desired_distance** **(** **)**
|
||||
- |void| **set_target_desired_distance**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_target_desired_distance**\ (\ )
|
||||
|
||||
The distance threshold before the target is considered to be reached. On reaching the target, :ref:`target_reached<class_NavigationAgent2D_signal_target_reached>` is emitted and navigation ends (see :ref:`is_navigation_finished<class_NavigationAgent2D_method_is_navigation_finished>` and :ref:`navigation_finished<class_NavigationAgent2D_signal_navigation_finished>`).
|
||||
|
||||
@@ -616,8 +616,8 @@ You can also make navigation end closer to the target than each individual path
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_target_position** **(** :ref:`Vector2<class_Vector2>` value **)**
|
||||
- :ref:`Vector2<class_Vector2>` **get_target_position** **(** **)**
|
||||
- |void| **set_target_position**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
||||
- :ref:`Vector2<class_Vector2>` **get_target_position**\ (\ )
|
||||
|
||||
If set, a new navigation path from the current agent position to the :ref:`target_position<class_NavigationAgent2D_property_target_position>` is requested from the NavigationServer.
|
||||
|
||||
@@ -633,8 +633,8 @@ If set, a new navigation path from the current agent position to the :ref:`targe
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_time_horizon_agents** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_time_horizon_agents** **(** **)**
|
||||
- |void| **set_time_horizon_agents**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_time_horizon_agents**\ (\ )
|
||||
|
||||
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
|
||||
@@ -650,8 +650,8 @@ The minimal amount of time for which this agent's velocities, that are computed
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_time_horizon_obstacles** **(** :ref:`float<class_float>` value **)**
|
||||
- :ref:`float<class_float>` **get_time_horizon_obstacles** **(** **)**
|
||||
- |void| **set_time_horizon_obstacles**\ (\ value\: :ref:`float<class_float>`\ )
|
||||
- :ref:`float<class_float>` **get_time_horizon_obstacles**\ (\ )
|
||||
|
||||
The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to static avoidance obstacles. The larger the number, the sooner the agent will respond to static avoidance obstacles, but less freedom in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
|
||||
|
||||
@@ -667,8 +667,8 @@ The minimal amount of time for which this agent's velocities, that are computed
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- void **set_velocity** **(** :ref:`Vector2<class_Vector2>` value **)**
|
||||
- :ref:`Vector2<class_Vector2>` **get_velocity** **(** **)**
|
||||
- |void| **set_velocity**\ (\ value\: :ref:`Vector2<class_Vector2>`\ )
|
||||
- :ref:`Vector2<class_Vector2>` **get_velocity**\ (\ )
|
||||
|
||||
Sets the new wanted velocity for the agent. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agents and obstacles. When an agent is teleported to a new position, use :ref:`set_velocity_forced<class_NavigationAgent2D_method_set_velocity_forced>` as well to reset the internal simulation velocity.
|
||||
|
||||
@@ -685,7 +685,7 @@ Method Descriptions
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`float<class_float>` **distance_to_target** **(** **)** |const|
|
||||
:ref:`float<class_float>` **distance_to_target**\ (\ ) |const|
|
||||
|
||||
Returns the distance to the target position, using the agent's global position. The user must set :ref:`target_position<class_NavigationAgent2D_property_target_position>` in order for this to be accurate.
|
||||
|
||||
@@ -697,7 +697,7 @@ Returns the distance to the target position, using the agent's global position.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **get_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const|
|
||||
:ref:`bool<class_bool>` **get_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const|
|
||||
|
||||
Returns whether or not the specified layer of the :ref:`avoidance_layers<class_NavigationAgent2D_property_avoidance_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32.
|
||||
|
||||
@@ -709,7 +709,7 @@ Returns whether or not the specified layer of the :ref:`avoidance_layers<class_N
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **get_avoidance_mask_value** **(** :ref:`int<class_int>` mask_number **)** |const|
|
||||
:ref:`bool<class_bool>` **get_avoidance_mask_value**\ (\ mask_number\: :ref:`int<class_int>`\ ) |const|
|
||||
|
||||
Returns whether or not the specified mask of the :ref:`avoidance_mask<class_NavigationAgent2D_property_avoidance_mask>` bitmask is enabled, given a ``mask_number`` between 1 and 32.
|
||||
|
||||
@@ -721,7 +721,7 @@ Returns whether or not the specified mask of the :ref:`avoidance_mask<class_Navi
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`PackedVector2Array<class_PackedVector2Array>` **get_current_navigation_path** **(** **)** |const|
|
||||
:ref:`PackedVector2Array<class_PackedVector2Array>` **get_current_navigation_path**\ (\ ) |const|
|
||||
|
||||
Returns this agent's current path from start to finish in global coordinates. The path only updates when the target position is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended :ref:`get_next_path_position<class_NavigationAgent2D_method_get_next_path_position>` once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic.
|
||||
|
||||
@@ -733,7 +733,7 @@ Returns this agent's current path from start to finish in global coordinates. Th
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`int<class_int>` **get_current_navigation_path_index** **(** **)** |const|
|
||||
:ref:`int<class_int>` **get_current_navigation_path_index**\ (\ ) |const|
|
||||
|
||||
Returns which index the agent is currently on in the navigation path's :ref:`PackedVector2Array<class_PackedVector2Array>`.
|
||||
|
||||
@@ -745,7 +745,7 @@ Returns which index the agent is currently on in the navigation path's :ref:`Pac
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` **get_current_navigation_result** **(** **)** |const|
|
||||
:ref:`NavigationPathQueryResult2D<class_NavigationPathQueryResult2D>` **get_current_navigation_result**\ (\ ) |const|
|
||||
|
||||
Returns the path query result for the path the agent is currently following.
|
||||
|
||||
@@ -757,7 +757,7 @@ Returns the path query result for the path the agent is currently following.
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2<class_Vector2>` **get_final_position** **(** **)**
|
||||
:ref:`Vector2<class_Vector2>` **get_final_position**\ (\ )
|
||||
|
||||
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 :ref:`path_changed<class_NavigationAgent2D_signal_path_changed>` signal.
|
||||
|
||||
@@ -769,7 +769,7 @@ Returns the reachable final position of the current navigation path in global co
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **get_navigation_layer_value** **(** :ref:`int<class_int>` layer_number **)** |const|
|
||||
:ref:`bool<class_bool>` **get_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`\ ) |const|
|
||||
|
||||
Returns whether or not the specified layer of the :ref:`navigation_layers<class_NavigationAgent2D_property_navigation_layers>` bitmask is enabled, given a ``layer_number`` between 1 and 32.
|
||||
|
||||
@@ -781,7 +781,7 @@ Returns whether or not the specified layer of the :ref:`navigation_layers<class_
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const|
|
||||
:ref:`RID<class_RID>` **get_navigation_map**\ (\ ) |const|
|
||||
|
||||
Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationAgent node. This function returns always the map set on the NavigationAgent node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationAgent node will not be aware of the map change. Use :ref:`set_navigation_map<class_NavigationAgent2D_method_set_navigation_map>` to change the navigation map for the NavigationAgent and also update the agent on the NavigationServer.
|
||||
|
||||
@@ -793,7 +793,7 @@ Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationAgent
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`Vector2<class_Vector2>` **get_next_path_position** **(** **)**
|
||||
:ref:`Vector2<class_Vector2>` **get_next_path_position**\ (\ )
|
||||
|
||||
Returns the next position in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent.
|
||||
|
||||
@@ -805,7 +805,7 @@ Returns the next position in global coordinates that can be moved to, making sur
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`RID<class_RID>` **get_rid** **(** **)** |const|
|
||||
:ref:`RID<class_RID>` **get_rid**\ (\ ) |const|
|
||||
|
||||
Returns the :ref:`RID<class_RID>` of this agent on the :ref:`NavigationServer2D<class_NavigationServer2D>`.
|
||||
|
||||
@@ -817,7 +817,7 @@ Returns the :ref:`RID<class_RID>` of this agent on the :ref:`NavigationServer2D<
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_navigation_finished** **(** **)**
|
||||
:ref:`bool<class_bool>` **is_navigation_finished**\ (\ )
|
||||
|
||||
Returns ``true`` if the agent's navigation has finished. If the target is reachable, navigation ends when the target is reached. If the target is unreachable, navigation ends when the last waypoint of the path is reached.
|
||||
|
||||
@@ -831,7 +831,7 @@ Returns ``true`` if the agent's navigation has finished. If the target is reacha
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_target_reachable** **(** **)**
|
||||
:ref:`bool<class_bool>` **is_target_reachable**\ (\ )
|
||||
|
||||
Returns ``true`` if :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>` is within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent2D_property_target_position>`.
|
||||
|
||||
@@ -843,7 +843,7 @@ Returns ``true`` if :ref:`get_final_position<class_NavigationAgent2D_method_get_
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
:ref:`bool<class_bool>` **is_target_reached** **(** **)** |const|
|
||||
:ref:`bool<class_bool>` **is_target_reached**\ (\ ) |const|
|
||||
|
||||
Returns ``true`` if the agent reached the target, i.e. the agent moved within :ref:`target_desired_distance<class_NavigationAgent2D_property_target_desired_distance>` of the :ref:`target_position<class_NavigationAgent2D_property_target_position>`. It may not always be possible to reach the target but it should always be possible to reach the final position. See :ref:`get_final_position<class_NavigationAgent2D_method_get_final_position>`.
|
||||
|
||||
@@ -855,7 +855,7 @@ Returns ``true`` if the agent reached the target, i.e. the agent moved within :r
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_avoidance_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)**
|
||||
|void| **set_avoidance_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ )
|
||||
|
||||
Based on ``value``, enables or disables the specified layer in the :ref:`avoidance_layers<class_NavigationAgent2D_property_avoidance_layers>` bitmask, given a ``layer_number`` between 1 and 32.
|
||||
|
||||
@@ -867,7 +867,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`avoidan
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_avoidance_mask_value** **(** :ref:`int<class_int>` mask_number, :ref:`bool<class_bool>` value **)**
|
||||
|void| **set_avoidance_mask_value**\ (\ mask_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ )
|
||||
|
||||
Based on ``value``, enables or disables the specified mask in the :ref:`avoidance_mask<class_NavigationAgent2D_property_avoidance_mask>` bitmask, given a ``mask_number`` between 1 and 32.
|
||||
|
||||
@@ -879,7 +879,7 @@ Based on ``value``, enables or disables the specified mask in the :ref:`avoidanc
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_navigation_layer_value** **(** :ref:`int<class_int>` layer_number, :ref:`bool<class_bool>` value **)**
|
||||
|void| **set_navigation_layer_value**\ (\ layer_number\: :ref:`int<class_int>`, value\: :ref:`bool<class_bool>`\ )
|
||||
|
||||
Based on ``value``, enables or disables the specified layer in the :ref:`navigation_layers<class_NavigationAgent2D_property_navigation_layers>` bitmask, given a ``layer_number`` between 1 and 32.
|
||||
|
||||
@@ -891,7 +891,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`navigat
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)**
|
||||
|void| **set_navigation_map**\ (\ navigation_map\: :ref:`RID<class_RID>`\ )
|
||||
|
||||
Sets the :ref:`RID<class_RID>` of the navigation map this NavigationAgent node should use and also updates the ``agent`` on the NavigationServer.
|
||||
|
||||
@@ -903,7 +903,7 @@ Sets the :ref:`RID<class_RID>` of the navigation map this NavigationAgent node s
|
||||
|
||||
.. rst-class:: classref-method
|
||||
|
||||
void **set_velocity_forced** **(** :ref:`Vector2<class_Vector2>` velocity **)**
|
||||
|void| **set_velocity_forced**\ (\ velocity\: :ref:`Vector2<class_Vector2>`\ )
|
||||
|
||||
Replaces the internal velocity in the collision avoidance simulation with ``velocity``. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck.
|
||||
|
||||
@@ -914,3 +914,4 @@ Replaces the internal velocity in the collision avoidance simulation with ``velo
|
||||
.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
|
||||
.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
|
||||
.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
|
||||
.. |void| replace:: :abbr:`void (No return value.)`
|
||||
|
||||
Reference in New Issue
Block a user