mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-05 22:09:56 +03:00
classref: Sync with current master branch (68ad520)
This commit is contained in:
@@ -14,20 +14,18 @@ NavigationObstacle3D
|
||||
|
||||
**Inherits:** :ref:`Node3D<class_Node3D>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
|
||||
|
||||
3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area.
|
||||
3D obstacle used to affect navigation mesh baking or constrain velocities of avoidance controlled agents.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
Description
|
||||
-----------
|
||||
|
||||
3D Obstacle used in navigation to constrain avoidance controlled agents outside or inside an area. The obstacle needs a navigation map and outline vertices defined to work correctly.
|
||||
An obstacle needs a navigation map and outline :ref:`vertices<class_NavigationObstacle3D_property_vertices>` defined to work correctly. The outlines can not cross or overlap and are restricted to a plane projection. This means the y-axis of the vertices is ignored, instead the obstacle's global y-axis position is used for placement. The projected shape is extruded by the obstacles height along the y-axis.
|
||||
|
||||
If the obstacle's vertices are winded in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Outlines must not cross or overlap.
|
||||
Obstacles can be included in the navigation mesh baking process when :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` is enabled. They do not add walkable geometry, instead their role is to discard other source geometry inside the shape. This can be used to prevent navigation mesh from appearing in unwanted places, e.g. inside "solid" geometry or on top of it. If :ref:`carve_navigation_mesh<class_NavigationObstacle3D_property_carve_navigation_mesh>` is enabled the baked shape will not be affected by offsets of the navigation mesh baking, e.g. the agent radius.
|
||||
|
||||
Obstacles are **not** a replacement for a (re)baked navigation mesh. Obstacles **don't** change the resulting path from the pathfinding, obstacles only affect the navigation avoidance agent movement by altering the suggested velocity of the avoidance agent.
|
||||
|
||||
Obstacles using vertices can warp to a new position but should not moved every frame as each move requires a rebuild of the avoidance map.
|
||||
With :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` the obstacle can constrain the avoidance velocities of avoidance using agents. If the obstacle's vertices are wound in clockwise order, avoidance agents will be pushed in by the obstacle, otherwise, avoidance agents will be pushed out. Obstacles using vertices and avoidance can warp to a new position but should not be moved every single frame as each change requires a rebuild of the avoidance map.
|
||||
|
||||
.. rst-class:: classref-introduction-group
|
||||
|
||||
@@ -44,21 +42,25 @@ Properties
|
||||
.. table::
|
||||
:widths: auto
|
||||
|
||||
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` | ``true`` |
|
||||
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle3D_property_avoidance_layers>` | ``1`` |
|
||||
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`height<class_NavigationObstacle3D_property_height>` | ``1.0`` |
|
||||
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle3D_property_radius>` | ``0.0`` |
|
||||
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`use_3d_avoidance<class_NavigationObstacle3D_property_use_3d_avoidance>` | ``false`` |
|
||||
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`velocity<class_NavigationObstacle3D_property_velocity>` | ``Vector3(0, 0, 0)`` |
|
||||
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`vertices<class_NavigationObstacle3D_property_vertices>` | ``PackedVector3Array()`` |
|
||||
+-----------------------------------------------------+---------------------------------------------------------------------------------+--------------------------+
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` | ``false`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`avoidance_enabled<class_NavigationObstacle3D_property_avoidance_enabled>` | ``true`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`int<class_int>` | :ref:`avoidance_layers<class_NavigationObstacle3D_property_avoidance_layers>` | ``1`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`carve_navigation_mesh<class_NavigationObstacle3D_property_carve_navigation_mesh>` | ``false`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`height<class_NavigationObstacle3D_property_height>` | ``1.0`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle3D_property_radius>` | ``0.0`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`bool<class_bool>` | :ref:`use_3d_avoidance<class_NavigationObstacle3D_property_use_3d_avoidance>` | ``false`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`Vector3<class_Vector3>` | :ref:`velocity<class_NavigationObstacle3D_property_velocity>` | ``Vector3(0, 0, 0)`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`vertices<class_NavigationObstacle3D_property_vertices>` | ``PackedVector3Array()`` |
|
||||
+-----------------------------------------------------+-------------------------------------------------------------------------------------------+--------------------------+
|
||||
|
||||
.. rst-class:: classref-reftable-group
|
||||
|
||||
@@ -89,6 +91,23 @@ Methods
|
||||
Property Descriptions
|
||||
---------------------
|
||||
|
||||
.. _class_NavigationObstacle3D_property_affect_navigation_mesh:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **affect_navigation_mesh** = ``false``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_affect_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **get_affect_navigation_mesh**\ (\ )
|
||||
|
||||
If enabled and parsed in a navigation mesh baking process the obstacle will discard source geometry inside its :ref:`vertices<class_NavigationObstacle3D_property_vertices>` and :ref:`height<class_NavigationObstacle3D_property_height>` defined shape.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_NavigationObstacle3D_property_avoidance_enabled:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
@@ -123,6 +142,27 @@ A bitfield determining the avoidance layers for this obstacle. Agents with a mat
|
||||
|
||||
----
|
||||
|
||||
.. _class_NavigationObstacle3D_property_carve_navigation_mesh:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
:ref:`bool<class_bool>` **carve_navigation_mesh** = ``false``
|
||||
|
||||
.. rst-class:: classref-property-setget
|
||||
|
||||
- |void| **set_carve_navigation_mesh**\ (\ value\: :ref:`bool<class_bool>`\ )
|
||||
- :ref:`bool<class_bool>` **get_carve_navigation_mesh**\ (\ )
|
||||
|
||||
If enabled the obstacle vertices will carve into the baked navigation mesh with the shape unaffected by additional offsets (e.g. agent radius).
|
||||
|
||||
It will still be affected by further postprocessing of the baking process, like edge and polygon simplification.
|
||||
|
||||
Requires :ref:`affect_navigation_mesh<class_NavigationObstacle3D_property_affect_navigation_mesh>` to be enabled.
|
||||
|
||||
.. rst-class:: classref-item-separator
|
||||
|
||||
----
|
||||
|
||||
.. _class_NavigationObstacle3D_property_height:
|
||||
|
||||
.. rst-class:: classref-property
|
||||
|
||||
Reference in New Issue
Block a user