class_navigationpathqueryparameters2d.rst 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/NavigationPathQueryParameters2D.xml.
  6. .. _class_NavigationPathQueryParameters2D:
  7. NavigationPathQueryParameters2D
  8. ===============================
  9. **Inherits:** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Parameters to be sent to a 2D navigation path query.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This class contains the start and target position and other parameters to be used with :ref:`NavigationServer2D.query_path<class_NavigationServer2D_method_query_path>`.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+
  21. | :ref:`RID<class_RID>` | :ref:`map<class_NavigationPathQueryParameters2D_property_map>` | |
  22. +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+
  23. | :ref:`int<class_int>` | :ref:`navigation_layers<class_NavigationPathQueryParameters2D_property_navigation_layers>` | ``1`` |
  24. +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+
  25. | :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` | :ref:`path_postprocessing<class_NavigationPathQueryParameters2D_property_path_postprocessing>` | ``0`` |
  26. +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+
  27. | :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` | :ref:`pathfinding_algorithm<class_NavigationPathQueryParameters2D_property_pathfinding_algorithm>` | ``0`` |
  28. +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+
  29. | :ref:`Vector2<class_Vector2>` | :ref:`start_position<class_NavigationPathQueryParameters2D_property_start_position>` | ``Vector2(0, 0)`` |
  30. +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+
  31. | :ref:`Vector2<class_Vector2>` | :ref:`target_position<class_NavigationPathQueryParameters2D_property_target_position>` | ``Vector2(0, 0)`` |
  32. +----------------------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------+-------------------+
  33. .. rst-class:: classref-section-separator
  34. ----
  35. .. rst-class:: classref-descriptions-group
  36. Enumerations
  37. ------------
  38. .. _enum_NavigationPathQueryParameters2D_PathfindingAlgorithm:
  39. .. rst-class:: classref-enumeration
  40. enum **PathfindingAlgorithm**:
  41. .. _class_NavigationPathQueryParameters2D_constant_PATHFINDING_ALGORITHM_ASTAR:
  42. .. rst-class:: classref-enumeration-constant
  43. :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **PATHFINDING_ALGORITHM_ASTAR** = ``0``
  44. The path query uses the default A\* pathfinding algorithm.
  45. .. rst-class:: classref-item-separator
  46. ----
  47. .. _enum_NavigationPathQueryParameters2D_PathPostProcessing:
  48. .. rst-class:: classref-enumeration
  49. enum **PathPostProcessing**:
  50. .. _class_NavigationPathQueryParameters2D_constant_PATH_POSTPROCESSING_CORRIDORFUNNEL:
  51. .. rst-class:: classref-enumeration-constant
  52. :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **PATH_POSTPROCESSING_CORRIDORFUNNEL** = ``0``
  53. Applies a funnel algorithm to the raw path corridor found by the pathfinding algorithm. This will result in the shortest path possible inside the path corridor. This postprocessing very much depends on the navigation mesh polygon layout and the created corridor. Especially tile- or gridbased layouts can face artificial corners with diagonal movement due to a jagged path corridor imposed by the cell shapes.
  54. .. _class_NavigationPathQueryParameters2D_constant_PATH_POSTPROCESSING_EDGECENTERED:
  55. .. rst-class:: classref-enumeration-constant
  56. :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **PATH_POSTPROCESSING_EDGECENTERED** = ``1``
  57. Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center.
  58. .. rst-class:: classref-section-separator
  59. ----
  60. .. rst-class:: classref-descriptions-group
  61. Property Descriptions
  62. ---------------------
  63. .. _class_NavigationPathQueryParameters2D_property_map:
  64. .. rst-class:: classref-property
  65. :ref:`RID<class_RID>` **map**
  66. .. rst-class:: classref-property-setget
  67. - void **set_map** **(** :ref:`RID<class_RID>` value **)**
  68. - :ref:`RID<class_RID>` **get_map** **(** **)**
  69. The navigation ``map`` :ref:`RID<class_RID>` used in the path query.
  70. .. rst-class:: classref-item-separator
  71. ----
  72. .. _class_NavigationPathQueryParameters2D_property_navigation_layers:
  73. .. rst-class:: classref-property
  74. :ref:`int<class_int>` **navigation_layers** = ``1``
  75. .. rst-class:: classref-property-setget
  76. - void **set_navigation_layers** **(** :ref:`int<class_int>` value **)**
  77. - :ref:`int<class_int>` **get_navigation_layers** **(** **)**
  78. The navigation layers the query will use (as a bitmask).
  79. .. rst-class:: classref-item-separator
  80. ----
  81. .. _class_NavigationPathQueryParameters2D_property_path_postprocessing:
  82. .. rst-class:: classref-property
  83. :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **path_postprocessing** = ``0``
  84. .. rst-class:: classref-property-setget
  85. - void **set_path_postprocessing** **(** :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` value **)**
  86. - :ref:`PathPostProcessing<enum_NavigationPathQueryParameters2D_PathPostProcessing>` **get_path_postprocessing** **(** **)**
  87. The path postprocessing applied to the raw path corridor found by the :ref:`pathfinding_algorithm<class_NavigationPathQueryParameters2D_property_pathfinding_algorithm>`.
  88. .. rst-class:: classref-item-separator
  89. ----
  90. .. _class_NavigationPathQueryParameters2D_property_pathfinding_algorithm:
  91. .. rst-class:: classref-property
  92. :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **pathfinding_algorithm** = ``0``
  93. .. rst-class:: classref-property-setget
  94. - void **set_pathfinding_algorithm** **(** :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` value **)**
  95. - :ref:`PathfindingAlgorithm<enum_NavigationPathQueryParameters2D_PathfindingAlgorithm>` **get_pathfinding_algorithm** **(** **)**
  96. The pathfinding algorithm used in the path query.
  97. .. rst-class:: classref-item-separator
  98. ----
  99. .. _class_NavigationPathQueryParameters2D_property_start_position:
  100. .. rst-class:: classref-property
  101. :ref:`Vector2<class_Vector2>` **start_position** = ``Vector2(0, 0)``
  102. .. rst-class:: classref-property-setget
  103. - void **set_start_position** **(** :ref:`Vector2<class_Vector2>` value **)**
  104. - :ref:`Vector2<class_Vector2>` **get_start_position** **(** **)**
  105. The pathfinding start position in global coordinates.
  106. .. rst-class:: classref-item-separator
  107. ----
  108. .. _class_NavigationPathQueryParameters2D_property_target_position:
  109. .. rst-class:: classref-property
  110. :ref:`Vector2<class_Vector2>` **target_position** = ``Vector2(0, 0)``
  111. .. rst-class:: classref-property-setget
  112. - void **set_target_position** **(** :ref:`Vector2<class_Vector2>` value **)**
  113. - :ref:`Vector2<class_Vector2>` **get_target_position** **(** **)**
  114. The pathfinding target position in global coordinates.
  115. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  116. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  117. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  118. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  119. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  120. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`