class_navigationobstacle2d.rst 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 NavigationObstacle2D.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_NavigationObstacle2D:
  6. NavigationObstacle2D
  7. ====================
  8. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. 2D Obstacle used in navigation for collision avoidance.
  10. Description
  11. -----------
  12. 2D 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:`Navigation2D<class_Navigation2D>` node, or using :ref:`set_navigation<class_NavigationObstacle2D_method_set_navigation>`. :ref:`NavigationObstacle<class_NavigationObstacle>` is physics safe.
  13. Methods
  14. -------
  15. +-------------------------+------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`Node<class_Node>` | :ref:`get_navigation<class_NavigationObstacle2D_method_get_navigation>` **(** **)** const |
  17. +-------------------------+------------------------------------------------------------------------------------------------------------------------+
  18. | void | :ref:`set_navigation<class_NavigationObstacle2D_method_set_navigation>` **(** :ref:`Node<class_Node>` navigation **)** |
  19. +-------------------------+------------------------------------------------------------------------------------------------------------------------+
  20. Method Descriptions
  21. -------------------
  22. .. _class_NavigationObstacle2D_method_get_navigation:
  23. - :ref:`Node<class_Node>` **get_navigation** **(** **)** const
  24. Returns the :ref:`Navigation2D<class_Navigation2D>` node that the obstacle is using for its navigation system.
  25. ----
  26. .. _class_NavigationObstacle2D_method_set_navigation:
  27. - void **set_navigation** **(** :ref:`Node<class_Node>` navigation **)**
  28. Sets the :ref:`Navigation2D<class_Navigation2D>` node used by the obstacle. Useful when you don't want to make the obstacle a child of a :ref:`Navigation2D<class_Navigation2D>` node.