class_navigationregion.rst 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the NavigationRegion.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_NavigationRegion:
  6. NavigationRegion
  7. ================
  8. **Inherits:** :ref:`Spatial<class_Spatial>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. A region of the navigation map.
  10. Description
  11. -----------
  12. 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).
  13. Properties
  14. ----------
  15. +---------------------------------------------+---------------------------------------------------------+----------+
  16. | :ref:`bool<class_bool>` | :ref:`enabled<class_NavigationRegion_property_enabled>` | ``true`` |
  17. +---------------------------------------------+---------------------------------------------------------+----------+
  18. | :ref:`NavigationMesh<class_NavigationMesh>` | :ref:`navmesh<class_NavigationRegion_property_navmesh>` | |
  19. +---------------------------------------------+---------------------------------------------------------+----------+
  20. Methods
  21. -------
  22. +------+---------------------------------------------------------------------------------------------+
  23. | void | :ref:`bake_navigation_mesh<class_NavigationRegion_method_bake_navigation_mesh>` **(** **)** |
  24. +------+---------------------------------------------------------------------------------------------+
  25. Signals
  26. -------
  27. .. _class_NavigationRegion_signal_bake_finished:
  28. - **bake_finished** **(** **)**
  29. Notifies when the navigation mesh bake operation is completed.
  30. ----
  31. .. _class_NavigationRegion_signal_navigation_mesh_changed:
  32. - **navigation_mesh_changed** **(** **)**
  33. Notifies when the :ref:`NavigationMesh<class_NavigationMesh>` has changed.
  34. Property Descriptions
  35. ---------------------
  36. .. _class_NavigationRegion_property_enabled:
  37. - :ref:`bool<class_bool>` **enabled**
  38. +-----------+--------------------+
  39. | *Default* | ``true`` |
  40. +-----------+--------------------+
  41. | *Setter* | set_enabled(value) |
  42. +-----------+--------------------+
  43. | *Getter* | is_enabled() |
  44. +-----------+--------------------+
  45. Determines if the ``NavigationRegion`` is enabled or disabled.
  46. ----
  47. .. _class_NavigationRegion_property_navmesh:
  48. - :ref:`NavigationMesh<class_NavigationMesh>` **navmesh**
  49. +----------+----------------------------+
  50. | *Setter* | set_navigation_mesh(value) |
  51. +----------+----------------------------+
  52. | *Getter* | get_navigation_mesh() |
  53. +----------+----------------------------+
  54. The :ref:`NavigationMesh<class_NavigationMesh>` resource to use.
  55. Method Descriptions
  56. -------------------
  57. .. _class_NavigationRegion_method_bake_navigation_mesh:
  58. - void **bake_navigation_mesh** **(** **)**
  59. 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>`.