class_navigationobstacle.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/NavigationObstacle.xml.
  6. .. _class_NavigationObstacle:
  7. NavigationObstacle
  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. This can be done by having the obstacle as a child of a :ref:`Navigation<class_Navigation>` node, or using :ref:`set_navigation<class_NavigationObstacle_method_set_navigation>`. **NavigationObstacle** 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-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +---------------------------+---------------------------------------------------------------------------+----------+
  22. | :ref:`bool<class_bool>` | :ref:`estimate_radius<class_NavigationObstacle_property_estimate_radius>` | ``true`` |
  23. +---------------------------+---------------------------------------------------------------------------+----------+
  24. | :ref:`float<class_float>` | :ref:`radius<class_NavigationObstacle_property_radius>` | ``1.0`` |
  25. +---------------------------+---------------------------------------------------------------------------+----------+
  26. .. rst-class:: classref-reftable-group
  27. Methods
  28. -------
  29. .. table::
  30. :widths: auto
  31. +-------------------------+----------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`Node<class_Node>` | :ref:`get_navigation<class_NavigationObstacle_method_get_navigation>` **(** **)** |const| |
  33. +-------------------------+----------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`RID<class_RID>` | :ref:`get_rid<class_NavigationObstacle_method_get_rid>` **(** **)** |const| |
  35. +-------------------------+----------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`set_navigation<class_NavigationObstacle_method_set_navigation>` **(** :ref:`Node<class_Node>` navigation **)** |
  37. +-------------------------+----------------------------------------------------------------------------------------------------------------------+
  38. .. rst-class:: classref-section-separator
  39. ----
  40. .. rst-class:: classref-descriptions-group
  41. Property Descriptions
  42. ---------------------
  43. .. _class_NavigationObstacle_property_estimate_radius:
  44. .. rst-class:: classref-property
  45. :ref:`bool<class_bool>` **estimate_radius** = ``true``
  46. .. rst-class:: classref-property-setget
  47. - void **set_estimate_radius** **(** :ref:`bool<class_bool>` value **)**
  48. - :ref:`bool<class_bool>` **is_radius_estimated** **(** **)**
  49. Enables radius estimation algorithm which uses parent's collision shapes to determine the obstacle radius.
  50. .. rst-class:: classref-item-separator
  51. ----
  52. .. _class_NavigationObstacle_property_radius:
  53. .. rst-class:: classref-property
  54. :ref:`float<class_float>` **radius** = ``1.0``
  55. .. rst-class:: classref-property-setget
  56. - void **set_radius** **(** :ref:`float<class_float>` value **)**
  57. - :ref:`float<class_float>` **get_radius** **(** **)**
  58. The radius of the agent. Used only if :ref:`estimate_radius<class_NavigationObstacle_property_estimate_radius>` is set to ``false``.
  59. .. rst-class:: classref-section-separator
  60. ----
  61. .. rst-class:: classref-descriptions-group
  62. Method Descriptions
  63. -------------------
  64. .. _class_NavigationObstacle_method_get_navigation:
  65. .. rst-class:: classref-method
  66. :ref:`Node<class_Node>` **get_navigation** **(** **)** |const|
  67. Returns the :ref:`Navigation<class_Navigation>` node that the obstacle is using for its navigation system.
  68. .. rst-class:: classref-item-separator
  69. ----
  70. .. _class_NavigationObstacle_method_get_rid:
  71. .. rst-class:: classref-method
  72. :ref:`RID<class_RID>` **get_rid** **(** **)** |const|
  73. Returns the :ref:`RID<class_RID>` of this obstacle on the :ref:`NavigationServer<class_NavigationServer>`.
  74. .. rst-class:: classref-item-separator
  75. ----
  76. .. _class_NavigationObstacle_method_set_navigation:
  77. .. rst-class:: classref-method
  78. void **set_navigation** **(** :ref:`Node<class_Node>` navigation **)**
  79. Sets the :ref:`Navigation<class_Navigation>` node used by the obstacle. Useful when you don't want to make the obstacle a child of a :ref:`Navigation<class_Navigation>` node.
  80. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  81. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  82. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  83. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`