Files
godot-docs/classes/class_navigationregion.rst
2020-03-13 17:17:50 +01:00

94 lines
3.2 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the NavigationRegion.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_NavigationRegion:
NavigationRegion
================
**Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
A region of the navigation map.
Description
-----------
A region of the navigation map. It tells the :ref:`Navigation<class_Navigation>` node what can be navigated and what cannot, based on the :ref:`NavigationMesh<class_NavigationMesh>` resource. This should be a child of a :ref:`Navigation<class_Navigation>` node (even not a direct child).
Properties
----------
+---------------------------------------------+---------------------------------------------------------+----------+
| :ref:`bool<class_bool>` | :ref:`enabled<class_NavigationRegion_property_enabled>` | ``true`` |
+---------------------------------------------+---------------------------------------------------------+----------+
| :ref:`NavigationMesh<class_NavigationMesh>` | :ref:`navmesh<class_NavigationRegion_property_navmesh>` | |
+---------------------------------------------+---------------------------------------------------------+----------+
Methods
-------
+------+---------------------------------------------------------------------------------------------+
| void | :ref:`bake_navigation_mesh<class_NavigationRegion_method_bake_navigation_mesh>` **(** **)** |
+------+---------------------------------------------------------------------------------------------+
Signals
-------
.. _class_NavigationRegion_signal_bake_finished:
- **bake_finished** **(** **)**
Notifies when the navigation mesh bake operation is completed.
----
.. _class_NavigationRegion_signal_navigation_mesh_changed:
- **navigation_mesh_changed** **(** **)**
Notifies when the :ref:`NavigationMesh<class_NavigationMesh>` has changed.
Property Descriptions
---------------------
.. _class_NavigationRegion_property_enabled:
- :ref:`bool<class_bool>` **enabled**
+-----------+--------------------+
| *Default* | ``true`` |
+-----------+--------------------+
| *Setter* | set_enabled(value) |
+-----------+--------------------+
| *Getter* | is_enabled() |
+-----------+--------------------+
Determines if the ``NavigationRegion`` is enabled or disabled.
----
.. _class_NavigationRegion_property_navmesh:
- :ref:`NavigationMesh<class_NavigationMesh>` **navmesh**
+----------+----------------------------+
| *Setter* | set_navigation_mesh(value) |
+----------+----------------------------+
| *Getter* | get_navigation_mesh() |
+----------+----------------------------+
The :ref:`NavigationMesh<class_NavigationMesh>` resource to use.
Method Descriptions
-------------------
.. _class_NavigationRegion_method_bake_navigation_mesh:
- void **bake_navigation_mesh** **(** **)**
Bakes the :ref:`NavigationMesh<class_NavigationMesh>`. The baking is done in a separate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new :ref:`NavigationMesh<class_NavigationMesh>`.