class_navigationregion3d.rst 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/make_rst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the NavigationRegion3D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_NavigationRegion3D:
  6. NavigationRegion3D
  7. ==================
  8. **Inherits:** :ref:`Node3D<class_Node3D>` **<** :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:`NavigationServer3D<class_NavigationServer3D>` what can be navigated and what cannot, based on its :ref:`NavigationMesh<class_NavigationMesh>` resource.
  13. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using :ref:`NavigationServer3D.map_set_edge_connection_margin<class_NavigationServer3D_method_map_set_edge_connection_margin>`.
  14. Properties
  15. ----------
  16. +---------------------------------------------+-----------------------------------------------------------+----------+
  17. | :ref:`bool<class_bool>` | :ref:`enabled<class_NavigationRegion3D_property_enabled>` | ``true`` |
  18. +---------------------------------------------+-----------------------------------------------------------+----------+
  19. | :ref:`int<class_int>` | :ref:`layers<class_NavigationRegion3D_property_layers>` | ``1`` |
  20. +---------------------------------------------+-----------------------------------------------------------+----------+
  21. | :ref:`NavigationMesh<class_NavigationMesh>` | :ref:`navmesh<class_NavigationRegion3D_property_navmesh>` | |
  22. +---------------------------------------------+-----------------------------------------------------------+----------+
  23. Methods
  24. -------
  25. +------+-----------------------------------------------------------------------------------------------+
  26. | void | :ref:`bake_navigation_mesh<class_NavigationRegion3D_method_bake_navigation_mesh>` **(** **)** |
  27. +------+-----------------------------------------------------------------------------------------------+
  28. Signals
  29. -------
  30. .. _class_NavigationRegion3D_signal_bake_finished:
  31. - **bake_finished** **(** **)**
  32. Notifies when the navigation mesh bake operation is completed.
  33. ----
  34. .. _class_NavigationRegion3D_signal_navigation_mesh_changed:
  35. - **navigation_mesh_changed** **(** **)**
  36. Notifies when the :ref:`NavigationMesh<class_NavigationMesh>` has changed.
  37. Property Descriptions
  38. ---------------------
  39. .. _class_NavigationRegion3D_property_enabled:
  40. - :ref:`bool<class_bool>` **enabled**
  41. +-----------+--------------------+
  42. | *Default* | ``true`` |
  43. +-----------+--------------------+
  44. | *Setter* | set_enabled(value) |
  45. +-----------+--------------------+
  46. | *Getter* | is_enabled() |
  47. +-----------+--------------------+
  48. Determines if the ``NavigationRegion3D`` is enabled or disabled.
  49. ----
  50. .. _class_NavigationRegion3D_property_layers:
  51. - :ref:`int<class_int>` **layers**
  52. +-----------+-------------------+
  53. | *Default* | ``1`` |
  54. +-----------+-------------------+
  55. | *Setter* | set_layers(value) |
  56. +-----------+-------------------+
  57. | *Getter* | get_layers() |
  58. +-----------+-------------------+
  59. A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with :ref:`NavigationServer3D.map_get_path<class_NavigationServer3D_method_map_get_path>`.
  60. ----
  61. .. _class_NavigationRegion3D_property_navmesh:
  62. - :ref:`NavigationMesh<class_NavigationMesh>` **navmesh**
  63. +----------+----------------------------+
  64. | *Setter* | set_navigation_mesh(value) |
  65. +----------+----------------------------+
  66. | *Getter* | get_navigation_mesh() |
  67. +----------+----------------------------+
  68. The :ref:`NavigationMesh<class_NavigationMesh>` resource to use.
  69. Method Descriptions
  70. -------------------
  71. .. _class_NavigationRegion3D_method_bake_navigation_mesh:
  72. - void **bake_navigation_mesh** **(** **)**
  73. 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>`.
  74. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  75. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  76. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  77. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  78. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  79. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`