class_navigationobstacle3d.rst 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/NavigationObstacle3D.xml.
  6. .. _class_NavigationObstacle3D:
  7. NavigationObstacle3D
  8. ====================
  9. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. 3D Obstacle used in navigation for collision avoidance.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 3D Obstacle used in navigation for collision avoidance. The obstacle needs navigation data to work correctly. **NavigationObstacle3D** is physics safe.
  15. Obstacles **don't** change the resulting path from the pathfinding, they only affect the navigation agent movement in a radius. Therefore, using obstacles for the static walls in your level won't work because those walls don't exist in the pathfinding. The navigation agent will be pushed in a semi-random direction away while moving inside that radius. Obstacles are intended as a last resort option for constantly moving objects that cannot be (re)baked to a navigation mesh efficiently.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Using NavigationObstacles <../tutorials/navigation/navigation_using_navigationobstacles>`
  20. .. rst-class:: classref-reftable-group
  21. Properties
  22. ----------
  23. .. table::
  24. :widths: auto
  25. +---------------------------+-----------------------------------------------------------------------------+----------+
  26. | :ref:`bool<class_bool>` | :ref:`estimate_radius<class_NavigationObstacle3D_property_estimate_radius>` | ``true`` |
  27. +---------------------------+-----------------------------------------------------------------------------+----------+
  28. | :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle3D_property_radius>` | ``1.0`` |
  29. +---------------------------+-----------------------------------------------------------------------------+----------+
  30. .. rst-class:: classref-reftable-group
  31. Methods
  32. -------
  33. .. table::
  34. :widths: auto
  35. +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`RID<class_RID>` | :ref:`get_navigation_map<class_NavigationObstacle3D_method_get_navigation_map>` **(** **)** |const| |
  37. +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationObstacle3D_method_get_rid>` **(** **)** |const| |
  39. +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`set_navigation_map<class_NavigationObstacle3D_method_set_navigation_map>` **(** :ref:`RID<class_RID>` navigation_map **)** |
  41. +-----------------------+----------------------------------------------------------------------------------------------------------------------------------+
  42. .. rst-class:: classref-section-separator
  43. ----
  44. .. rst-class:: classref-descriptions-group
  45. Property Descriptions
  46. ---------------------
  47. .. _class_NavigationObstacle3D_property_estimate_radius:
  48. .. rst-class:: classref-property
  49. :ref:`bool<class_bool>` **estimate_radius** = ``true``
  50. .. rst-class:: classref-property-setget
  51. - void **set_estimate_radius** **(** :ref:`bool<class_bool>` value **)**
  52. - :ref:`bool<class_bool>` **is_radius_estimated** **(** **)**
  53. Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius.
  54. .. rst-class:: classref-item-separator
  55. ----
  56. .. _class_NavigationObstacle3D_property_radius:
  57. .. rst-class:: classref-property
  58. :ref:`float<class_float>` **radius** = ``1.0``
  59. .. rst-class:: classref-property-setget
  60. - void **set_radius** **(** :ref:`float<class_float>` value **)**
  61. - :ref:`float<class_float>` **get_radius** **(** **)**
  62. The radius of the agent. Used only if :ref:`estimate_radius<class_NavigationObstacle3D_property_estimate_radius>` is set to false.
  63. .. rst-class:: classref-section-separator
  64. ----
  65. .. rst-class:: classref-descriptions-group
  66. Method Descriptions
  67. -------------------
  68. .. _class_NavigationObstacle3D_method_get_navigation_map:
  69. .. rst-class:: classref-method
  70. :ref:`RID<class_RID>` **get_navigation_map** **(** **)** |const|
  71. Returns the :ref:`RID<class_RID>` of the navigation map for this NavigationObstacle node. This function returns always the map set on the NavigationObstacle node and not the map of the abstract agent on the NavigationServer. If the agent map is changed directly with the NavigationServer API the NavigationObstacle node will not be aware of the map change. Use :ref:`set_navigation_map<class_NavigationObstacle3D_method_set_navigation_map>` to change the navigation map for the NavigationObstacle and also update the agent on the NavigationServer.
  72. .. rst-class:: classref-item-separator
  73. ----
  74. .. _class_NavigationObstacle3D_method_get_rid:
  75. .. rst-class:: classref-method
  76. :ref:`RID<class_RID>` **get_rid** **(** **)** |const|
  77. Returns the :ref:`RID<class_RID>` of this obstacle on the :ref:`NavigationServer3D<class_NavigationServer3D>`.
  78. .. rst-class:: classref-item-separator
  79. ----
  80. .. _class_NavigationObstacle3D_method_set_navigation_map:
  81. .. rst-class:: classref-method
  82. void **set_navigation_map** **(** :ref:`RID<class_RID>` navigation_map **)**
  83. Sets the :ref:`RID<class_RID>` of the navigation map this NavigationObstacle node should use and also updates the ``agent`` on the NavigationServer.
  84. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  85. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  86. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  87. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  88. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  89. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`