class_navigationserver3d.rst 150 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866
  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/NavigationServer3D.xml.
  6. .. _class_NavigationServer3D:
  7. NavigationServer3D
  8. ==================
  9. **Inherits:** :ref:`Object<class_Object>`
  10. A server interface for low-level 3D navigation access.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. NavigationServer3D is the server that handles navigation maps, regions and agents. It does not handle A\* navigation from :ref:`AStar3D<class_AStar3D>`.
  15. Maps are made up of regions, which are made of navigation meshes. Together, they define the navigable areas in the 3D world.
  16. \ **Note:** Most **NavigationServer3D** changes take effect after the next physics frame and not immediately. This includes all changes made to maps, regions or agents by navigation-related nodes in the scene tree or made through scripts.
  17. For two regions to be connected to each other, they must share a similar edge. An edge is considered connected to another if both of its two vertices are at a distance less than ``edge_connection_margin`` to the respective other edge's vertex.
  18. You may assign navigation layers to regions with :ref:`region_set_navigation_layers<class_NavigationServer3D_method_region_set_navigation_layers>`, which then can be checked upon when requesting a path with :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>`. This can be used to allow or deny certain areas for some objects.
  19. To use the collision avoidance system, you may use agents. You can set an agent's target velocity, then the servers will emit a callback with a modified velocity.
  20. \ **Note:** The collision avoidance system ignores regions. Using the modified velocity directly may move an agent outside of the traversable area. This is a limitation of the collision avoidance system, any more complex situation may require the use of the physics engine.
  21. This server keeps tracks of any call and executes them during the sync phase. This means that you can request any change to the map, using any thread, without worrying.
  22. .. rst-class:: classref-introduction-group
  23. Tutorials
  24. ---------
  25. - `3D Navmesh Demo <https://godotengine.org/asset-library/asset/124>`__
  26. - :doc:`Using NavigationServer <../tutorials/navigation/navigation_using_navigationservers>`
  27. .. rst-class:: classref-reftable-group
  28. Methods
  29. -------
  30. .. table::
  31. :widths: auto
  32. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`RID<class_RID>` | :ref:`agent_create<class_NavigationServer3D_method_agent_create>` **(** **)** |
  34. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`agent_get_avoidance_enabled<class_NavigationServer3D_method_agent_get_avoidance_enabled>` **(** :ref:`RID<class_RID>` agent **)** |const| |
  36. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`RID<class_RID>` | :ref:`agent_get_map<class_NavigationServer3D_method_agent_get_map>` **(** :ref:`RID<class_RID>` agent **)** |const| |
  38. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`agent_get_paused<class_NavigationServer3D_method_agent_get_paused>` **(** :ref:`RID<class_RID>` agent **)** |const| |
  40. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`bool<class_bool>` | :ref:`agent_get_use_3d_avoidance<class_NavigationServer3D_method_agent_get_use_3d_avoidance>` **(** :ref:`RID<class_RID>` agent **)** |const| |
  42. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`bool<class_bool>` | :ref:`agent_is_map_changed<class_NavigationServer3D_method_agent_is_map_changed>` **(** :ref:`RID<class_RID>` agent **)** |const| |
  44. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`agent_set_avoidance_callback<class_NavigationServer3D_method_agent_set_avoidance_callback>` **(** :ref:`RID<class_RID>` agent, :ref:`Callable<class_Callable>` callback **)** |
  46. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | void | :ref:`agent_set_avoidance_enabled<class_NavigationServer3D_method_agent_set_avoidance_enabled>` **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)** |
  48. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`agent_set_avoidance_layers<class_NavigationServer3D_method_agent_set_avoidance_layers>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` layers **)** |
  50. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`agent_set_avoidance_mask<class_NavigationServer3D_method_agent_set_avoidance_mask>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` mask **)** |
  52. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`agent_set_avoidance_priority<class_NavigationServer3D_method_agent_set_avoidance_priority>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` priority **)** |
  54. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | void | :ref:`agent_set_height<class_NavigationServer3D_method_agent_set_height>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` height **)** |
  56. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | void | :ref:`agent_set_map<class_NavigationServer3D_method_agent_set_map>` **(** :ref:`RID<class_RID>` agent, :ref:`RID<class_RID>` map **)** |
  58. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | void | :ref:`agent_set_max_neighbors<class_NavigationServer3D_method_agent_set_max_neighbors>` **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` count **)** |
  60. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | void | :ref:`agent_set_max_speed<class_NavigationServer3D_method_agent_set_max_speed>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` max_speed **)** |
  62. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | void | :ref:`agent_set_neighbor_distance<class_NavigationServer3D_method_agent_set_neighbor_distance>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` distance **)** |
  64. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | void | :ref:`agent_set_paused<class_NavigationServer3D_method_agent_set_paused>` **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` paused **)** |
  66. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | void | :ref:`agent_set_position<class_NavigationServer3D_method_agent_set_position>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` position **)** |
  68. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`agent_set_radius<class_NavigationServer3D_method_agent_set_radius>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` radius **)** |
  70. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`agent_set_time_horizon_agents<class_NavigationServer3D_method_agent_set_time_horizon_agents>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** |
  72. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`agent_set_time_horizon_obstacles<class_NavigationServer3D_method_agent_set_time_horizon_obstacles>` **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)** |
  74. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | void | :ref:`agent_set_use_3d_avoidance<class_NavigationServer3D_method_agent_set_use_3d_avoidance>` **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)** |
  76. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | void | :ref:`agent_set_velocity<class_NavigationServer3D_method_agent_set_velocity>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)** |
  78. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`agent_set_velocity_forced<class_NavigationServer3D_method_agent_set_velocity_forced>` **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)** |
  80. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Callable<class_Callable>` callback=Callable() **)** |
  82. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`bake_from_source_geometry_data_async<class_NavigationServer3D_method_bake_from_source_geometry_data_async>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Callable<class_Callable>` callback=Callable() **)** |
  84. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | void | :ref:`free_rid<class_NavigationServer3D_method_free_rid>` **(** :ref:`RID<class_RID>` rid **)** |
  86. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`bool<class_bool>` | :ref:`get_debug_enabled<class_NavigationServer3D_method_get_debug_enabled>` **(** **)** |const| |
  88. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`RID[]<class_RID>` | :ref:`get_maps<class_NavigationServer3D_method_get_maps>` **(** **)** |const| |
  90. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`int<class_int>` | :ref:`get_process_info<class_NavigationServer3D_method_get_process_info>` **(** :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` process_info **)** |const| |
  92. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | :ref:`RID<class_RID>` | :ref:`link_create<class_NavigationServer3D_method_link_create>` **(** **)** |
  94. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | :ref:`bool<class_bool>` | :ref:`link_get_enabled<class_NavigationServer3D_method_link_get_enabled>` **(** :ref:`RID<class_RID>` link **)** |const| |
  96. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | :ref:`Vector3<class_Vector3>` | :ref:`link_get_end_position<class_NavigationServer3D_method_link_get_end_position>` **(** :ref:`RID<class_RID>` link **)** |const| |
  98. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | :ref:`float<class_float>` | :ref:`link_get_enter_cost<class_NavigationServer3D_method_link_get_enter_cost>` **(** :ref:`RID<class_RID>` link **)** |const| |
  100. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | :ref:`RID<class_RID>` | :ref:`link_get_map<class_NavigationServer3D_method_link_get_map>` **(** :ref:`RID<class_RID>` link **)** |const| |
  102. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | :ref:`int<class_int>` | :ref:`link_get_navigation_layers<class_NavigationServer3D_method_link_get_navigation_layers>` **(** :ref:`RID<class_RID>` link **)** |const| |
  104. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | :ref:`int<class_int>` | :ref:`link_get_owner_id<class_NavigationServer3D_method_link_get_owner_id>` **(** :ref:`RID<class_RID>` link **)** |const| |
  106. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | :ref:`Vector3<class_Vector3>` | :ref:`link_get_start_position<class_NavigationServer3D_method_link_get_start_position>` **(** :ref:`RID<class_RID>` link **)** |const| |
  108. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | :ref:`float<class_float>` | :ref:`link_get_travel_cost<class_NavigationServer3D_method_link_get_travel_cost>` **(** :ref:`RID<class_RID>` link **)** |const| |
  110. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | :ref:`bool<class_bool>` | :ref:`link_is_bidirectional<class_NavigationServer3D_method_link_is_bidirectional>` **(** :ref:`RID<class_RID>` link **)** |const| |
  112. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | void | :ref:`link_set_bidirectional<class_NavigationServer3D_method_link_set_bidirectional>` **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` bidirectional **)** |
  114. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`link_set_enabled<class_NavigationServer3D_method_link_set_enabled>` **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` enabled **)** |
  116. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`link_set_end_position<class_NavigationServer3D_method_link_set_end_position>` **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)** |
  118. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`link_set_enter_cost<class_NavigationServer3D_method_link_set_enter_cost>` **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` enter_cost **)** |
  120. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | void | :ref:`link_set_map<class_NavigationServer3D_method_link_set_map>` **(** :ref:`RID<class_RID>` link, :ref:`RID<class_RID>` map **)** |
  122. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | void | :ref:`link_set_navigation_layers<class_NavigationServer3D_method_link_set_navigation_layers>` **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` navigation_layers **)** |
  124. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | void | :ref:`link_set_owner_id<class_NavigationServer3D_method_link_set_owner_id>` **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)** |
  126. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | void | :ref:`link_set_start_position<class_NavigationServer3D_method_link_set_start_position>` **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)** |
  128. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | void | :ref:`link_set_travel_cost<class_NavigationServer3D_method_link_set_travel_cost>` **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` travel_cost **)** |
  130. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | :ref:`RID<class_RID>` | :ref:`map_create<class_NavigationServer3D_method_map_create>` **(** **)** |
  132. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | void | :ref:`map_force_update<class_NavigationServer3D_method_map_force_update>` **(** :ref:`RID<class_RID>` map **)** |
  134. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | :ref:`RID[]<class_RID>` | :ref:`map_get_agents<class_NavigationServer3D_method_map_get_agents>` **(** :ref:`RID<class_RID>` map **)** |const| |
  136. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | :ref:`float<class_float>` | :ref:`map_get_cell_height<class_NavigationServer3D_method_map_get_cell_height>` **(** :ref:`RID<class_RID>` map **)** |const| |
  138. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | :ref:`float<class_float>` | :ref:`map_get_cell_size<class_NavigationServer3D_method_map_get_cell_size>` **(** :ref:`RID<class_RID>` map **)** |const| |
  140. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| |
  142. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point_normal<class_NavigationServer3D_method_map_get_closest_point_normal>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| |
  144. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | :ref:`RID<class_RID>` | :ref:`map_get_closest_point_owner<class_NavigationServer3D_method_map_get_closest_point_owner>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const| |
  146. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point_to_segment<class_NavigationServer3D_method_map_get_closest_point_to_segment>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` start, :ref:`Vector3<class_Vector3>` end, :ref:`bool<class_bool>` use_collision=false **)** |const| |
  148. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | :ref:`float<class_float>` | :ref:`map_get_edge_connection_margin<class_NavigationServer3D_method_map_get_edge_connection_margin>` **(** :ref:`RID<class_RID>` map **)** |const| |
  150. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | :ref:`float<class_float>` | :ref:`map_get_link_connection_radius<class_NavigationServer3D_method_map_get_link_connection_radius>` **(** :ref:`RID<class_RID>` map **)** |const| |
  152. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | :ref:`RID[]<class_RID>` | :ref:`map_get_links<class_NavigationServer3D_method_map_get_links>` **(** :ref:`RID<class_RID>` map **)** |const| |
  154. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | :ref:`RID[]<class_RID>` | :ref:`map_get_obstacles<class_NavigationServer3D_method_map_get_obstacles>` **(** :ref:`RID<class_RID>` map **)** |const| |
  156. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` origin, :ref:`Vector3<class_Vector3>` destination, :ref:`bool<class_bool>` optimize, :ref:`int<class_int>` navigation_layers=1 **)** |const| |
  158. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | :ref:`Vector3<class_Vector3>` | :ref:`map_get_random_point<class_NavigationServer3D_method_map_get_random_point>` **(** :ref:`RID<class_RID>` map, :ref:`int<class_int>` navigation_layers, :ref:`bool<class_bool>` uniformly **)** |const| |
  160. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | :ref:`RID[]<class_RID>` | :ref:`map_get_regions<class_NavigationServer3D_method_map_get_regions>` **(** :ref:`RID<class_RID>` map **)** |const| |
  162. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | :ref:`Vector3<class_Vector3>` | :ref:`map_get_up<class_NavigationServer3D_method_map_get_up>` **(** :ref:`RID<class_RID>` map **)** |const| |
  164. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | :ref:`bool<class_bool>` | :ref:`map_get_use_edge_connections<class_NavigationServer3D_method_map_get_use_edge_connections>` **(** :ref:`RID<class_RID>` map **)** |const| |
  166. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | :ref:`bool<class_bool>` | :ref:`map_is_active<class_NavigationServer3D_method_map_is_active>` **(** :ref:`RID<class_RID>` map **)** |const| |
  168. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | void | :ref:`map_set_active<class_NavigationServer3D_method_map_set_active>` **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` active **)** |
  170. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | void | :ref:`map_set_cell_height<class_NavigationServer3D_method_map_set_cell_height>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_height **)** |
  172. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | void | :ref:`map_set_cell_size<class_NavigationServer3D_method_map_set_cell_size>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_size **)** |
  174. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | void | :ref:`map_set_edge_connection_margin<class_NavigationServer3D_method_map_set_edge_connection_margin>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` margin **)** |
  176. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | void | :ref:`map_set_link_connection_radius<class_NavigationServer3D_method_map_set_link_connection_radius>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` radius **)** |
  178. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | void | :ref:`map_set_up<class_NavigationServer3D_method_map_set_up>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` up **)** |
  180. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | void | :ref:`map_set_use_edge_connections<class_NavigationServer3D_method_map_set_use_edge_connections>` **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` enabled **)** |
  182. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | :ref:`RID<class_RID>` | :ref:`obstacle_create<class_NavigationServer3D_method_obstacle_create>` **(** **)** |
  184. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | :ref:`bool<class_bool>` | :ref:`obstacle_get_avoidance_enabled<class_NavigationServer3D_method_obstacle_get_avoidance_enabled>` **(** :ref:`RID<class_RID>` obstacle **)** |const| |
  186. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | :ref:`RID<class_RID>` | :ref:`obstacle_get_map<class_NavigationServer3D_method_obstacle_get_map>` **(** :ref:`RID<class_RID>` obstacle **)** |const| |
  188. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | :ref:`bool<class_bool>` | :ref:`obstacle_get_paused<class_NavigationServer3D_method_obstacle_get_paused>` **(** :ref:`RID<class_RID>` obstacle **)** |const| |
  190. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | :ref:`bool<class_bool>` | :ref:`obstacle_get_use_3d_avoidance<class_NavigationServer3D_method_obstacle_get_use_3d_avoidance>` **(** :ref:`RID<class_RID>` obstacle **)** |const| |
  192. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | void | :ref:`obstacle_set_avoidance_enabled<class_NavigationServer3D_method_obstacle_set_avoidance_enabled>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** |
  194. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | void | :ref:`obstacle_set_avoidance_layers<class_NavigationServer3D_method_obstacle_set_avoidance_layers>` **(** :ref:`RID<class_RID>` obstacle, :ref:`int<class_int>` layers **)** |
  196. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | void | :ref:`obstacle_set_height<class_NavigationServer3D_method_obstacle_set_height>` **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` height **)** |
  198. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | void | :ref:`obstacle_set_map<class_NavigationServer3D_method_obstacle_set_map>` **(** :ref:`RID<class_RID>` obstacle, :ref:`RID<class_RID>` map **)** |
  200. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | void | :ref:`obstacle_set_paused<class_NavigationServer3D_method_obstacle_set_paused>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` paused **)** |
  202. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | void | :ref:`obstacle_set_position<class_NavigationServer3D_method_obstacle_set_position>` **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` position **)** |
  204. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | void | :ref:`obstacle_set_radius<class_NavigationServer3D_method_obstacle_set_radius>` **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` radius **)** |
  206. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | void | :ref:`obstacle_set_use_3d_avoidance<class_NavigationServer3D_method_obstacle_set_use_3d_avoidance>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** |
  208. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | void | :ref:`obstacle_set_velocity<class_NavigationServer3D_method_obstacle_set_velocity>` **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` velocity **)** |
  210. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | void | :ref:`obstacle_set_vertices<class_NavigationServer3D_method_obstacle_set_vertices>` **(** :ref:`RID<class_RID>` obstacle, :ref:`PackedVector3Array<class_PackedVector3Array>` vertices **)** |
  212. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. | void | :ref:`parse_source_geometry_data<class_NavigationServer3D_method_parse_source_geometry_data>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Node<class_Node>` root_node, :ref:`Callable<class_Callable>` callback=Callable() **)** |
  214. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  215. | void | :ref:`query_path<class_NavigationServer3D_method_query_path>` **(** :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>` parameters, :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` result **)** |const| |
  216. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  217. | void | :ref:`region_bake_navigation_mesh<class_NavigationServer3D_method_region_bake_navigation_mesh>` **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`Node<class_Node>` root_node **)** |
  218. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  219. | :ref:`RID<class_RID>` | :ref:`region_create<class_NavigationServer3D_method_region_create>` **(** **)** |
  220. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  221. | :ref:`Vector3<class_Vector3>` | :ref:`region_get_connection_pathway_end<class_NavigationServer3D_method_region_get_connection_pathway_end>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| |
  222. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  223. | :ref:`Vector3<class_Vector3>` | :ref:`region_get_connection_pathway_start<class_NavigationServer3D_method_region_get_connection_pathway_start>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const| |
  224. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  225. | :ref:`int<class_int>` | :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>` **(** :ref:`RID<class_RID>` region **)** |const| |
  226. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  227. | :ref:`bool<class_bool>` | :ref:`region_get_enabled<class_NavigationServer3D_method_region_get_enabled>` **(** :ref:`RID<class_RID>` region **)** |const| |
  228. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  229. | :ref:`float<class_float>` | :ref:`region_get_enter_cost<class_NavigationServer3D_method_region_get_enter_cost>` **(** :ref:`RID<class_RID>` region **)** |const| |
  230. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  231. | :ref:`RID<class_RID>` | :ref:`region_get_map<class_NavigationServer3D_method_region_get_map>` **(** :ref:`RID<class_RID>` region **)** |const| |
  232. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  233. | :ref:`int<class_int>` | :ref:`region_get_navigation_layers<class_NavigationServer3D_method_region_get_navigation_layers>` **(** :ref:`RID<class_RID>` region **)** |const| |
  234. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  235. | :ref:`int<class_int>` | :ref:`region_get_owner_id<class_NavigationServer3D_method_region_get_owner_id>` **(** :ref:`RID<class_RID>` region **)** |const| |
  236. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  237. | :ref:`Vector3<class_Vector3>` | :ref:`region_get_random_point<class_NavigationServer3D_method_region_get_random_point>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers, :ref:`bool<class_bool>` uniformly **)** |const| |
  238. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  239. | :ref:`float<class_float>` | :ref:`region_get_travel_cost<class_NavigationServer3D_method_region_get_travel_cost>` **(** :ref:`RID<class_RID>` region **)** |const| |
  240. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  241. | :ref:`bool<class_bool>` | :ref:`region_get_use_edge_connections<class_NavigationServer3D_method_region_get_use_edge_connections>` **(** :ref:`RID<class_RID>` region **)** |const| |
  242. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  243. | :ref:`bool<class_bool>` | :ref:`region_owns_point<class_NavigationServer3D_method_region_owns_point>` **(** :ref:`RID<class_RID>` region, :ref:`Vector3<class_Vector3>` point **)** |const| |
  244. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  245. | void | :ref:`region_set_enabled<class_NavigationServer3D_method_region_set_enabled>` **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)** |
  246. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  247. | void | :ref:`region_set_enter_cost<class_NavigationServer3D_method_region_set_enter_cost>` **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` enter_cost **)** |
  248. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  249. | void | :ref:`region_set_map<class_NavigationServer3D_method_region_set_map>` **(** :ref:`RID<class_RID>` region, :ref:`RID<class_RID>` map **)** |
  250. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  251. | void | :ref:`region_set_navigation_layers<class_NavigationServer3D_method_region_set_navigation_layers>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)** |
  252. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  253. | void | :ref:`region_set_navigation_mesh<class_NavigationServer3D_method_region_set_navigation_mesh>` **(** :ref:`RID<class_RID>` region, :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)** |
  254. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  255. | void | :ref:`region_set_owner_id<class_NavigationServer3D_method_region_set_owner_id>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)** |
  256. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  257. | void | :ref:`region_set_transform<class_NavigationServer3D_method_region_set_transform>` **(** :ref:`RID<class_RID>` region, :ref:`Transform3D<class_Transform3D>` transform **)** |
  258. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  259. | void | :ref:`region_set_travel_cost<class_NavigationServer3D_method_region_set_travel_cost>` **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` travel_cost **)** |
  260. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  261. | void | :ref:`region_set_use_edge_connections<class_NavigationServer3D_method_region_set_use_edge_connections>` **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)** |
  262. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  263. | void | :ref:`set_active<class_NavigationServer3D_method_set_active>` **(** :ref:`bool<class_bool>` active **)** |
  264. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  265. | void | :ref:`set_debug_enabled<class_NavigationServer3D_method_set_debug_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
  266. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  267. .. rst-class:: classref-section-separator
  268. ----
  269. .. rst-class:: classref-descriptions-group
  270. Signals
  271. -------
  272. .. _class_NavigationServer3D_signal_avoidance_debug_changed:
  273. .. rst-class:: classref-signal
  274. **avoidance_debug_changed** **(** **)**
  275. Emitted when avoidance debug settings are changed. Only available in debug builds.
  276. .. rst-class:: classref-item-separator
  277. ----
  278. .. _class_NavigationServer3D_signal_map_changed:
  279. .. rst-class:: classref-signal
  280. **map_changed** **(** :ref:`RID<class_RID>` map **)**
  281. Emitted when a navigation map is updated, when a region moves or is modified.
  282. .. rst-class:: classref-item-separator
  283. ----
  284. .. _class_NavigationServer3D_signal_navigation_debug_changed:
  285. .. rst-class:: classref-signal
  286. **navigation_debug_changed** **(** **)**
  287. Emitted when navigation debug settings are changed. Only available in debug builds.
  288. .. rst-class:: classref-section-separator
  289. ----
  290. .. rst-class:: classref-descriptions-group
  291. Enumerations
  292. ------------
  293. .. _enum_NavigationServer3D_ProcessInfo:
  294. .. rst-class:: classref-enumeration
  295. enum **ProcessInfo**:
  296. .. _class_NavigationServer3D_constant_INFO_ACTIVE_MAPS:
  297. .. rst-class:: classref-enumeration-constant
  298. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_ACTIVE_MAPS** = ``0``
  299. Constant to get the number of active navigation maps.
  300. .. _class_NavigationServer3D_constant_INFO_REGION_COUNT:
  301. .. rst-class:: classref-enumeration-constant
  302. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_REGION_COUNT** = ``1``
  303. Constant to get the number of active navigation regions.
  304. .. _class_NavigationServer3D_constant_INFO_AGENT_COUNT:
  305. .. rst-class:: classref-enumeration-constant
  306. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_AGENT_COUNT** = ``2``
  307. Constant to get the number of active navigation agents processing avoidance.
  308. .. _class_NavigationServer3D_constant_INFO_LINK_COUNT:
  309. .. rst-class:: classref-enumeration-constant
  310. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_LINK_COUNT** = ``3``
  311. Constant to get the number of active navigation links.
  312. .. _class_NavigationServer3D_constant_INFO_POLYGON_COUNT:
  313. .. rst-class:: classref-enumeration-constant
  314. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_POLYGON_COUNT** = ``4``
  315. Constant to get the number of navigation mesh polygons.
  316. .. _class_NavigationServer3D_constant_INFO_EDGE_COUNT:
  317. .. rst-class:: classref-enumeration-constant
  318. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_COUNT** = ``5``
  319. Constant to get the number of navigation mesh polygon edges.
  320. .. _class_NavigationServer3D_constant_INFO_EDGE_MERGE_COUNT:
  321. .. rst-class:: classref-enumeration-constant
  322. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_MERGE_COUNT** = ``6``
  323. Constant to get the number of navigation mesh polygon edges that were merged due to edge key overlap.
  324. .. _class_NavigationServer3D_constant_INFO_EDGE_CONNECTION_COUNT:
  325. .. rst-class:: classref-enumeration-constant
  326. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_CONNECTION_COUNT** = ``7``
  327. Constant to get the number of navigation mesh polygon edges that are considered connected by edge proximity.
  328. .. _class_NavigationServer3D_constant_INFO_EDGE_FREE_COUNT:
  329. .. rst-class:: classref-enumeration-constant
  330. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_FREE_COUNT** = ``8``
  331. Constant to get the number of navigation mesh polygon edges that could not be merged but may be still connected by edge proximity or with links.
  332. .. rst-class:: classref-section-separator
  333. ----
  334. .. rst-class:: classref-descriptions-group
  335. Method Descriptions
  336. -------------------
  337. .. _class_NavigationServer3D_method_agent_create:
  338. .. rst-class:: classref-method
  339. :ref:`RID<class_RID>` **agent_create** **(** **)**
  340. Creates the agent.
  341. .. rst-class:: classref-item-separator
  342. ----
  343. .. _class_NavigationServer3D_method_agent_get_avoidance_enabled:
  344. .. rst-class:: classref-method
  345. :ref:`bool<class_bool>` **agent_get_avoidance_enabled** **(** :ref:`RID<class_RID>` agent **)** |const|
  346. Returns ``true`` if the provided ``agent`` has avoidance enabled.
  347. .. rst-class:: classref-item-separator
  348. ----
  349. .. _class_NavigationServer3D_method_agent_get_map:
  350. .. rst-class:: classref-method
  351. :ref:`RID<class_RID>` **agent_get_map** **(** :ref:`RID<class_RID>` agent **)** |const|
  352. Returns the navigation map :ref:`RID<class_RID>` the requested ``agent`` is currently assigned to.
  353. .. rst-class:: classref-item-separator
  354. ----
  355. .. _class_NavigationServer3D_method_agent_get_paused:
  356. .. rst-class:: classref-method
  357. :ref:`bool<class_bool>` **agent_get_paused** **(** :ref:`RID<class_RID>` agent **)** |const|
  358. Returns ``true`` if the specified ``agent`` is paused.
  359. .. rst-class:: classref-item-separator
  360. ----
  361. .. _class_NavigationServer3D_method_agent_get_use_3d_avoidance:
  362. .. rst-class:: classref-method
  363. :ref:`bool<class_bool>` **agent_get_use_3d_avoidance** **(** :ref:`RID<class_RID>` agent **)** |const|
  364. Returns ``true`` if the provided ``agent`` uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z).
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_NavigationServer3D_method_agent_is_map_changed:
  368. .. rst-class:: classref-method
  369. :ref:`bool<class_bool>` **agent_is_map_changed** **(** :ref:`RID<class_RID>` agent **)** |const|
  370. Returns true if the map got changed the previous frame.
  371. .. rst-class:: classref-item-separator
  372. ----
  373. .. _class_NavigationServer3D_method_agent_set_avoidance_callback:
  374. .. rst-class:: classref-method
  375. void **agent_set_avoidance_callback** **(** :ref:`RID<class_RID>` agent, :ref:`Callable<class_Callable>` callback **)**
  376. Sets the callback :ref:`Callable<class_Callable>` that gets called after each avoidance processing step for the ``agent``. The calculated ``safe_velocity`` will be dispatched with a signal to the object just before the physics calculations.
  377. \ **Note:** Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use :ref:`agent_set_avoidance_callback<class_NavigationServer3D_method_agent_set_avoidance_callback>` again with an empty :ref:`Callable<class_Callable>`.
  378. .. rst-class:: classref-item-separator
  379. ----
  380. .. _class_NavigationServer3D_method_agent_set_avoidance_enabled:
  381. .. rst-class:: classref-method
  382. void **agent_set_avoidance_enabled** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)**
  383. If ``enabled`` is ``true``, the provided ``agent`` calculates avoidance.
  384. .. rst-class:: classref-item-separator
  385. ----
  386. .. _class_NavigationServer3D_method_agent_set_avoidance_layers:
  387. .. rst-class:: classref-method
  388. void **agent_set_avoidance_layers** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` layers **)**
  389. Set the agent's ``avoidance_layers`` bitmask.
  390. .. rst-class:: classref-item-separator
  391. ----
  392. .. _class_NavigationServer3D_method_agent_set_avoidance_mask:
  393. .. rst-class:: classref-method
  394. void **agent_set_avoidance_mask** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` mask **)**
  395. Set the agent's ``avoidance_mask`` bitmask.
  396. .. rst-class:: classref-item-separator
  397. ----
  398. .. _class_NavigationServer3D_method_agent_set_avoidance_priority:
  399. .. rst-class:: classref-method
  400. void **agent_set_avoidance_priority** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` priority **)**
  401. Set the agent's ``avoidance_priority`` with a ``priority`` between 0.0 (lowest priority) to 1.0 (highest priority).
  402. The specified ``agent`` does not adjust the velocity for other agents that would match the ``avoidance_mask`` but have a lower `` avoidance_priority``. This in turn makes the other agents with lower priority adjust their velocities even more to avoid collision with this agent.
  403. .. rst-class:: classref-item-separator
  404. ----
  405. .. _class_NavigationServer3D_method_agent_set_height:
  406. .. rst-class:: classref-method
  407. void **agent_set_height** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` height **)**
  408. Updates the provided ``agent`` ``height``.
  409. .. rst-class:: classref-item-separator
  410. ----
  411. .. _class_NavigationServer3D_method_agent_set_map:
  412. .. rst-class:: classref-method
  413. void **agent_set_map** **(** :ref:`RID<class_RID>` agent, :ref:`RID<class_RID>` map **)**
  414. Puts the agent in the map.
  415. .. rst-class:: classref-item-separator
  416. ----
  417. .. _class_NavigationServer3D_method_agent_set_max_neighbors:
  418. .. rst-class:: classref-method
  419. void **agent_set_max_neighbors** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` count **)**
  420. Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
  421. .. rst-class:: classref-item-separator
  422. ----
  423. .. _class_NavigationServer3D_method_agent_set_max_speed:
  424. .. rst-class:: classref-method
  425. void **agent_set_max_speed** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` max_speed **)**
  426. Sets the maximum speed of the agent. Must be positive.
  427. .. rst-class:: classref-item-separator
  428. ----
  429. .. _class_NavigationServer3D_method_agent_set_neighbor_distance:
  430. .. rst-class:: classref-method
  431. void **agent_set_neighbor_distance** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` distance **)**
  432. Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
  433. .. rst-class:: classref-item-separator
  434. ----
  435. .. _class_NavigationServer3D_method_agent_set_paused:
  436. .. rst-class:: classref-method
  437. void **agent_set_paused** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` paused **)**
  438. If ``paused`` is true the specified ``agent`` will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks.
  439. .. rst-class:: classref-item-separator
  440. ----
  441. .. _class_NavigationServer3D_method_agent_set_position:
  442. .. rst-class:: classref-method
  443. void **agent_set_position** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` position **)**
  444. Sets the position of the agent in world space.
  445. .. rst-class:: classref-item-separator
  446. ----
  447. .. _class_NavigationServer3D_method_agent_set_radius:
  448. .. rst-class:: classref-method
  449. void **agent_set_radius** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` radius **)**
  450. Sets the radius of the agent.
  451. .. rst-class:: classref-item-separator
  452. ----
  453. .. _class_NavigationServer3D_method_agent_set_time_horizon_agents:
  454. .. rst-class:: classref-method
  455. void **agent_set_time_horizon_agents** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)**
  456. The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
  457. .. rst-class:: classref-item-separator
  458. ----
  459. .. _class_NavigationServer3D_method_agent_set_time_horizon_obstacles:
  460. .. rst-class:: classref-method
  461. void **agent_set_time_horizon_obstacles** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)**
  462. The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to static avoidance obstacles. The larger this number, the sooner this agent will respond to the presence of static avoidance obstacles, but the less freedom this agent has in choosing its velocities. A too high value will slow down agents movement considerably. Must be positive.
  463. .. rst-class:: classref-item-separator
  464. ----
  465. .. _class_NavigationServer3D_method_agent_set_use_3d_avoidance:
  466. .. rst-class:: classref-method
  467. void **agent_set_use_3d_avoidance** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)**
  468. Sets if the agent uses the 2D avoidance or the 3D avoidance while avoidance is enabled.
  469. If ``true`` the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, unterwater or space. The 3D using agent only avoids other 3D avoidance using agent's. The 3D using agent only reacts to radius based avoidance obstacles. The 3D using agent ignores any vertices based obstacles. The 3D using agent only avoids other 3D using agent's.
  470. If ``false`` the agent calculates avoidance velocities in 2D along the xz-axis ignoring the y-axis. The 2D using agent only avoids other 2D avoidance using agent's. The 2D using agent reacts to radius avoidance obstacles. The 2D using agent reacts to vertices based avoidance obstacles. The 2D using agent only avoids other 2D using agent's. 2D using agents will ignore other 2D using agents or obstacles that are below their current position or above their current position including the agents height in 2D avoidance.
  471. .. rst-class:: classref-item-separator
  472. ----
  473. .. _class_NavigationServer3D_method_agent_set_velocity:
  474. .. rst-class:: classref-method
  475. void **agent_set_velocity** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)**
  476. Sets ``velocity`` as the new wanted velocity for the specified ``agent``. The avoidance simulation will try to fulfill this velocity if possible but will modify it to avoid collision with other agent's and obstacles. When an agent is teleported to a new position use :ref:`agent_set_velocity_forced<class_NavigationServer3D_method_agent_set_velocity_forced>` as well to reset the internal simulation velocity.
  477. .. rst-class:: classref-item-separator
  478. ----
  479. .. _class_NavigationServer3D_method_agent_set_velocity_forced:
  480. .. rst-class:: classref-method
  481. void **agent_set_velocity_forced** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)**
  482. Replaces the internal velocity in the collision avoidance simulation with ``velocity`` for the specified ``agent``. When an agent is teleported to a new position this function should be used in the same frame. If called frequently this function can get agents stuck.
  483. .. rst-class:: classref-item-separator
  484. ----
  485. .. _class_NavigationServer3D_method_bake_from_source_geometry_data:
  486. .. rst-class:: classref-method
  487. void **bake_from_source_geometry_data** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Callable<class_Callable>` callback=Callable() **)**
  488. Bakes the provided ``navigation_mesh`` with the data from the provided ``source_geometry_data``. After the process is finished the optional ``callback`` will be called.
  489. .. rst-class:: classref-item-separator
  490. ----
  491. .. _class_NavigationServer3D_method_bake_from_source_geometry_data_async:
  492. .. rst-class:: classref-method
  493. void **bake_from_source_geometry_data_async** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Callable<class_Callable>` callback=Callable() **)**
  494. Bakes the provided ``navigation_mesh`` with the data from the provided ``source_geometry_data`` as an async task running on a background thread. After the process is finished the optional ``callback`` will be called.
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_NavigationServer3D_method_free_rid:
  498. .. rst-class:: classref-method
  499. void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  500. Destroys the given RID.
  501. .. rst-class:: classref-item-separator
  502. ----
  503. .. _class_NavigationServer3D_method_get_debug_enabled:
  504. .. rst-class:: classref-method
  505. :ref:`bool<class_bool>` **get_debug_enabled** **(** **)** |const|
  506. Returns ``true`` when the NavigationServer has debug enabled.
  507. .. rst-class:: classref-item-separator
  508. ----
  509. .. _class_NavigationServer3D_method_get_maps:
  510. .. rst-class:: classref-method
  511. :ref:`RID[]<class_RID>` **get_maps** **(** **)** |const|
  512. Returns all created navigation map :ref:`RID<class_RID>`\ s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
  513. .. rst-class:: classref-item-separator
  514. ----
  515. .. _class_NavigationServer3D_method_get_process_info:
  516. .. rst-class:: classref-method
  517. :ref:`int<class_int>` **get_process_info** **(** :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` process_info **)** |const|
  518. Returns information about the current state of the NavigationServer. See :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` for a list of available states.
  519. .. rst-class:: classref-item-separator
  520. ----
  521. .. _class_NavigationServer3D_method_link_create:
  522. .. rst-class:: classref-method
  523. :ref:`RID<class_RID>` **link_create** **(** **)**
  524. Create a new link between two positions on a map.
  525. .. rst-class:: classref-item-separator
  526. ----
  527. .. _class_NavigationServer3D_method_link_get_enabled:
  528. .. rst-class:: classref-method
  529. :ref:`bool<class_bool>` **link_get_enabled** **(** :ref:`RID<class_RID>` link **)** |const|
  530. Returns ``true`` if the specified ``link`` is enabled.
  531. .. rst-class:: classref-item-separator
  532. ----
  533. .. _class_NavigationServer3D_method_link_get_end_position:
  534. .. rst-class:: classref-method
  535. :ref:`Vector3<class_Vector3>` **link_get_end_position** **(** :ref:`RID<class_RID>` link **)** |const|
  536. Returns the ending position of this ``link``.
  537. .. rst-class:: classref-item-separator
  538. ----
  539. .. _class_NavigationServer3D_method_link_get_enter_cost:
  540. .. rst-class:: classref-method
  541. :ref:`float<class_float>` **link_get_enter_cost** **(** :ref:`RID<class_RID>` link **)** |const|
  542. Returns the enter cost of this ``link``.
  543. .. rst-class:: classref-item-separator
  544. ----
  545. .. _class_NavigationServer3D_method_link_get_map:
  546. .. rst-class:: classref-method
  547. :ref:`RID<class_RID>` **link_get_map** **(** :ref:`RID<class_RID>` link **)** |const|
  548. Returns the navigation map :ref:`RID<class_RID>` the requested ``link`` is currently assigned to.
  549. .. rst-class:: classref-item-separator
  550. ----
  551. .. _class_NavigationServer3D_method_link_get_navigation_layers:
  552. .. rst-class:: classref-method
  553. :ref:`int<class_int>` **link_get_navigation_layers** **(** :ref:`RID<class_RID>` link **)** |const|
  554. Returns the navigation layers for this ``link``.
  555. .. rst-class:: classref-item-separator
  556. ----
  557. .. _class_NavigationServer3D_method_link_get_owner_id:
  558. .. rst-class:: classref-method
  559. :ref:`int<class_int>` **link_get_owner_id** **(** :ref:`RID<class_RID>` link **)** |const|
  560. Returns the ``ObjectID`` of the object which manages this link.
  561. .. rst-class:: classref-item-separator
  562. ----
  563. .. _class_NavigationServer3D_method_link_get_start_position:
  564. .. rst-class:: classref-method
  565. :ref:`Vector3<class_Vector3>` **link_get_start_position** **(** :ref:`RID<class_RID>` link **)** |const|
  566. Returns the starting position of this ``link``.
  567. .. rst-class:: classref-item-separator
  568. ----
  569. .. _class_NavigationServer3D_method_link_get_travel_cost:
  570. .. rst-class:: classref-method
  571. :ref:`float<class_float>` **link_get_travel_cost** **(** :ref:`RID<class_RID>` link **)** |const|
  572. Returns the travel cost of this ``link``.
  573. .. rst-class:: classref-item-separator
  574. ----
  575. .. _class_NavigationServer3D_method_link_is_bidirectional:
  576. .. rst-class:: classref-method
  577. :ref:`bool<class_bool>` **link_is_bidirectional** **(** :ref:`RID<class_RID>` link **)** |const|
  578. Returns whether this ``link`` can be travelled in both directions.
  579. .. rst-class:: classref-item-separator
  580. ----
  581. .. _class_NavigationServer3D_method_link_set_bidirectional:
  582. .. rst-class:: classref-method
  583. void **link_set_bidirectional** **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` bidirectional **)**
  584. Sets whether this ``link`` can be travelled in both directions.
  585. .. rst-class:: classref-item-separator
  586. ----
  587. .. _class_NavigationServer3D_method_link_set_enabled:
  588. .. rst-class:: classref-method
  589. void **link_set_enabled** **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` enabled **)**
  590. If ``enabled`` is ``true``, the specified ``link`` will contribute to its current navigation map.
  591. .. rst-class:: classref-item-separator
  592. ----
  593. .. _class_NavigationServer3D_method_link_set_end_position:
  594. .. rst-class:: classref-method
  595. void **link_set_end_position** **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)**
  596. Sets the exit position for the ``link``.
  597. .. rst-class:: classref-item-separator
  598. ----
  599. .. _class_NavigationServer3D_method_link_set_enter_cost:
  600. .. rst-class:: classref-method
  601. void **link_set_enter_cost** **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` enter_cost **)**
  602. Sets the ``enter_cost`` for this ``link``.
  603. .. rst-class:: classref-item-separator
  604. ----
  605. .. _class_NavigationServer3D_method_link_set_map:
  606. .. rst-class:: classref-method
  607. void **link_set_map** **(** :ref:`RID<class_RID>` link, :ref:`RID<class_RID>` map **)**
  608. Sets the navigation map :ref:`RID<class_RID>` for the link.
  609. .. rst-class:: classref-item-separator
  610. ----
  611. .. _class_NavigationServer3D_method_link_set_navigation_layers:
  612. .. rst-class:: classref-method
  613. void **link_set_navigation_layers** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` navigation_layers **)**
  614. Set the links's navigation layers. This allows selecting links from a path request (when using :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>`).
  615. .. rst-class:: classref-item-separator
  616. ----
  617. .. _class_NavigationServer3D_method_link_set_owner_id:
  618. .. rst-class:: classref-method
  619. void **link_set_owner_id** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)**
  620. Set the ``ObjectID`` of the object which manages this link.
  621. .. rst-class:: classref-item-separator
  622. ----
  623. .. _class_NavigationServer3D_method_link_set_start_position:
  624. .. rst-class:: classref-method
  625. void **link_set_start_position** **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)**
  626. Sets the entry position for this ``link``.
  627. .. rst-class:: classref-item-separator
  628. ----
  629. .. _class_NavigationServer3D_method_link_set_travel_cost:
  630. .. rst-class:: classref-method
  631. void **link_set_travel_cost** **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` travel_cost **)**
  632. Sets the ``travel_cost`` for this ``link``.
  633. .. rst-class:: classref-item-separator
  634. ----
  635. .. _class_NavigationServer3D_method_map_create:
  636. .. rst-class:: classref-method
  637. :ref:`RID<class_RID>` **map_create** **(** **)**
  638. Create a new map.
  639. .. rst-class:: classref-item-separator
  640. ----
  641. .. _class_NavigationServer3D_method_map_force_update:
  642. .. rst-class:: classref-method
  643. void **map_force_update** **(** :ref:`RID<class_RID>` map **)**
  644. This function immediately forces synchronization of the specified navigation ``map`` :ref:`RID<class_RID>`. By default navigation maps are only synchronized at the end of each physics frame. This function can be used to immediately (re)calculate all the navigation meshes and region connections of the navigation map. This makes it possible to query a navigation path for a changed map immediately and in the same frame (multiple times if needed).
  645. Due to technical restrictions the current NavigationServer command queue will be flushed. This means all already queued update commands for this physics frame will be executed, even those intended for other maps, regions and agents not part of the specified map. The expensive computation of the navigation meshes and region connections of a map will only be done for the specified map. Other maps will receive the normal synchronization at the end of the physics frame. Should the specified map receive changes after the forced update it will update again as well when the other maps receive their update.
  646. Avoidance processing and dispatch of the ``safe_velocity`` signals is untouched by this function and continues to happen for all maps and agents at the end of the physics frame.
  647. \ **Note:** With great power comes great responsibility. This function should only be used by users that really know what they are doing and have a good reason for it. Forcing an immediate update of a navigation map requires locking the NavigationServer and flushing the entire NavigationServer command queue. Not only can this severely impact the performance of a game but it can also introduce bugs if used inappropriately without much foresight.
  648. .. rst-class:: classref-item-separator
  649. ----
  650. .. _class_NavigationServer3D_method_map_get_agents:
  651. .. rst-class:: classref-method
  652. :ref:`RID[]<class_RID>` **map_get_agents** **(** :ref:`RID<class_RID>` map **)** |const|
  653. Returns all navigation agents :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``.
  654. .. rst-class:: classref-item-separator
  655. ----
  656. .. _class_NavigationServer3D_method_map_get_cell_height:
  657. .. rst-class:: classref-method
  658. :ref:`float<class_float>` **map_get_cell_height** **(** :ref:`RID<class_RID>` map **)** |const|
  659. Returns the map cell height used to rasterize the navigation mesh vertices on the Y axis.
  660. .. rst-class:: classref-item-separator
  661. ----
  662. .. _class_NavigationServer3D_method_map_get_cell_size:
  663. .. rst-class:: classref-method
  664. :ref:`float<class_float>` **map_get_cell_size** **(** :ref:`RID<class_RID>` map **)** |const|
  665. Returns the map cell size used to rasterize the navigation mesh vertices on the XZ plane.
  666. .. rst-class:: classref-item-separator
  667. ----
  668. .. _class_NavigationServer3D_method_map_get_closest_point:
  669. .. rst-class:: classref-method
  670. :ref:`Vector3<class_Vector3>` **map_get_closest_point** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const|
  671. Returns the point closest to the provided ``to_point`` on the navigation mesh surface.
  672. .. rst-class:: classref-item-separator
  673. ----
  674. .. _class_NavigationServer3D_method_map_get_closest_point_normal:
  675. .. rst-class:: classref-method
  676. :ref:`Vector3<class_Vector3>` **map_get_closest_point_normal** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const|
  677. Returns the normal for the point returned by :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>`.
  678. .. rst-class:: classref-item-separator
  679. ----
  680. .. _class_NavigationServer3D_method_map_get_closest_point_owner:
  681. .. rst-class:: classref-method
  682. :ref:`RID<class_RID>` **map_get_closest_point_owner** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const|
  683. Returns the owner region RID for the point returned by :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>`.
  684. .. rst-class:: classref-item-separator
  685. ----
  686. .. _class_NavigationServer3D_method_map_get_closest_point_to_segment:
  687. .. rst-class:: classref-method
  688. :ref:`Vector3<class_Vector3>` **map_get_closest_point_to_segment** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` start, :ref:`Vector3<class_Vector3>` end, :ref:`bool<class_bool>` use_collision=false **)** |const|
  689. Returns the closest point between the navigation surface and the segment.
  690. .. rst-class:: classref-item-separator
  691. ----
  692. .. _class_NavigationServer3D_method_map_get_edge_connection_margin:
  693. .. rst-class:: classref-method
  694. :ref:`float<class_float>` **map_get_edge_connection_margin** **(** :ref:`RID<class_RID>` map **)** |const|
  695. Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions.
  696. .. rst-class:: classref-item-separator
  697. ----
  698. .. _class_NavigationServer3D_method_map_get_link_connection_radius:
  699. .. rst-class:: classref-method
  700. :ref:`float<class_float>` **map_get_link_connection_radius** **(** :ref:`RID<class_RID>` map **)** |const|
  701. Returns the link connection radius of the map. This distance is the maximum range any link will search for navigation mesh polygons to connect to.
  702. .. rst-class:: classref-item-separator
  703. ----
  704. .. _class_NavigationServer3D_method_map_get_links:
  705. .. rst-class:: classref-method
  706. :ref:`RID[]<class_RID>` **map_get_links** **(** :ref:`RID<class_RID>` map **)** |const|
  707. Returns all navigation link :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``.
  708. .. rst-class:: classref-item-separator
  709. ----
  710. .. _class_NavigationServer3D_method_map_get_obstacles:
  711. .. rst-class:: classref-method
  712. :ref:`RID[]<class_RID>` **map_get_obstacles** **(** :ref:`RID<class_RID>` map **)** |const|
  713. Returns all navigation obstacle :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``.
  714. .. rst-class:: classref-item-separator
  715. ----
  716. .. _class_NavigationServer3D_method_map_get_path:
  717. .. rst-class:: classref-method
  718. :ref:`PackedVector3Array<class_PackedVector3Array>` **map_get_path** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` origin, :ref:`Vector3<class_Vector3>` destination, :ref:`bool<class_bool>` optimize, :ref:`int<class_int>` navigation_layers=1 **)** |const|
  719. Returns the navigation path to reach the destination from the origin. ``navigation_layers`` is a bitmask of all region navigation layers that are allowed to be in the path.
  720. .. rst-class:: classref-item-separator
  721. ----
  722. .. _class_NavigationServer3D_method_map_get_random_point:
  723. .. rst-class:: classref-method
  724. :ref:`Vector3<class_Vector3>` **map_get_random_point** **(** :ref:`RID<class_RID>` map, :ref:`int<class_int>` navigation_layers, :ref:`bool<class_bool>` uniformly **)** |const|
  725. Returns a random position picked from all map region polygons with matching ``navigation_layers``.
  726. If ``uniformly`` is ``true``, all map regions, polygons, and faces are weighted by their surface area (slower).
  727. If ``uniformly`` is ``false``, just a random region and a random polygon are picked (faster).
  728. .. rst-class:: classref-item-separator
  729. ----
  730. .. _class_NavigationServer3D_method_map_get_regions:
  731. .. rst-class:: classref-method
  732. :ref:`RID[]<class_RID>` **map_get_regions** **(** :ref:`RID<class_RID>` map **)** |const|
  733. Returns all navigation regions :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``.
  734. .. rst-class:: classref-item-separator
  735. ----
  736. .. _class_NavigationServer3D_method_map_get_up:
  737. .. rst-class:: classref-method
  738. :ref:`Vector3<class_Vector3>` **map_get_up** **(** :ref:`RID<class_RID>` map **)** |const|
  739. Returns the map's up direction.
  740. .. rst-class:: classref-item-separator
  741. ----
  742. .. _class_NavigationServer3D_method_map_get_use_edge_connections:
  743. .. rst-class:: classref-method
  744. :ref:`bool<class_bool>` **map_get_use_edge_connections** **(** :ref:`RID<class_RID>` map **)** |const|
  745. Returns true if the navigation ``map`` allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
  746. .. rst-class:: classref-item-separator
  747. ----
  748. .. _class_NavigationServer3D_method_map_is_active:
  749. .. rst-class:: classref-method
  750. :ref:`bool<class_bool>` **map_is_active** **(** :ref:`RID<class_RID>` map **)** |const|
  751. Returns true if the map is active.
  752. .. rst-class:: classref-item-separator
  753. ----
  754. .. _class_NavigationServer3D_method_map_set_active:
  755. .. rst-class:: classref-method
  756. void **map_set_active** **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` active **)**
  757. Sets the map active.
  758. .. rst-class:: classref-item-separator
  759. ----
  760. .. _class_NavigationServer3D_method_map_set_cell_height:
  761. .. rst-class:: classref-method
  762. void **map_set_cell_height** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_height **)**
  763. Sets the map cell height used to rasterize the navigation mesh vertices on the Y axis. Must match with the cell height of the used navigation meshes.
  764. .. rst-class:: classref-item-separator
  765. ----
  766. .. _class_NavigationServer3D_method_map_set_cell_size:
  767. .. rst-class:: classref-method
  768. void **map_set_cell_size** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_size **)**
  769. Sets the map cell size used to rasterize the navigation mesh vertices on the XZ plane. Must match with the cell size of the used navigation meshes.
  770. .. rst-class:: classref-item-separator
  771. ----
  772. .. _class_NavigationServer3D_method_map_set_edge_connection_margin:
  773. .. rst-class:: classref-method
  774. void **map_set_edge_connection_margin** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` margin **)**
  775. Set the map edge connection margin used to weld the compatible region edges.
  776. .. rst-class:: classref-item-separator
  777. ----
  778. .. _class_NavigationServer3D_method_map_set_link_connection_radius:
  779. .. rst-class:: classref-method
  780. void **map_set_link_connection_radius** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` radius **)**
  781. Set the map's link connection radius used to connect links to navigation polygons.
  782. .. rst-class:: classref-item-separator
  783. ----
  784. .. _class_NavigationServer3D_method_map_set_up:
  785. .. rst-class:: classref-method
  786. void **map_set_up** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` up **)**
  787. Sets the map up direction.
  788. .. rst-class:: classref-item-separator
  789. ----
  790. .. _class_NavigationServer3D_method_map_set_use_edge_connections:
  791. .. rst-class:: classref-method
  792. void **map_set_use_edge_connections** **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` enabled **)**
  793. Set the navigation ``map`` edge connection use. If ``enabled`` is ``true``, the navigation map allows navigation regions to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
  794. .. rst-class:: classref-item-separator
  795. ----
  796. .. _class_NavigationServer3D_method_obstacle_create:
  797. .. rst-class:: classref-method
  798. :ref:`RID<class_RID>` **obstacle_create** **(** **)**
  799. Creates a new obstacle.
  800. .. rst-class:: classref-item-separator
  801. ----
  802. .. _class_NavigationServer3D_method_obstacle_get_avoidance_enabled:
  803. .. rst-class:: classref-method
  804. :ref:`bool<class_bool>` **obstacle_get_avoidance_enabled** **(** :ref:`RID<class_RID>` obstacle **)** |const|
  805. Returns ``true`` if the provided ``obstacle`` has avoidance enabled.
  806. .. rst-class:: classref-item-separator
  807. ----
  808. .. _class_NavigationServer3D_method_obstacle_get_map:
  809. .. rst-class:: classref-method
  810. :ref:`RID<class_RID>` **obstacle_get_map** **(** :ref:`RID<class_RID>` obstacle **)** |const|
  811. Returns the navigation map :ref:`RID<class_RID>` the requested ``obstacle`` is currently assigned to.
  812. .. rst-class:: classref-item-separator
  813. ----
  814. .. _class_NavigationServer3D_method_obstacle_get_paused:
  815. .. rst-class:: classref-method
  816. :ref:`bool<class_bool>` **obstacle_get_paused** **(** :ref:`RID<class_RID>` obstacle **)** |const|
  817. Returns ``true`` if the specified ``obstacle`` is paused.
  818. .. rst-class:: classref-item-separator
  819. ----
  820. .. _class_NavigationServer3D_method_obstacle_get_use_3d_avoidance:
  821. .. rst-class:: classref-method
  822. :ref:`bool<class_bool>` **obstacle_get_use_3d_avoidance** **(** :ref:`RID<class_RID>` obstacle **)** |const|
  823. Returns ``true`` if the provided ``obstacle`` uses avoidance in 3D space Vector3(x,y,z) instead of horizontal 2D Vector2(x,y) / Vector3(x,0.0,z).
  824. .. rst-class:: classref-item-separator
  825. ----
  826. .. _class_NavigationServer3D_method_obstacle_set_avoidance_enabled:
  827. .. rst-class:: classref-method
  828. void **obstacle_set_avoidance_enabled** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)**
  829. If ``enabled`` is ``true``, the provided ``obstacle`` affects avoidance using agents.
  830. .. rst-class:: classref-item-separator
  831. ----
  832. .. _class_NavigationServer3D_method_obstacle_set_avoidance_layers:
  833. .. rst-class:: classref-method
  834. void **obstacle_set_avoidance_layers** **(** :ref:`RID<class_RID>` obstacle, :ref:`int<class_int>` layers **)**
  835. Set the obstacles's ``avoidance_layers`` bitmask.
  836. .. rst-class:: classref-item-separator
  837. ----
  838. .. _class_NavigationServer3D_method_obstacle_set_height:
  839. .. rst-class:: classref-method
  840. void **obstacle_set_height** **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` height **)**
  841. Sets the ``height`` for the ``obstacle``. In 3D agents will ignore obstacles that are above or below them while using 2D avoidance.
  842. .. rst-class:: classref-item-separator
  843. ----
  844. .. _class_NavigationServer3D_method_obstacle_set_map:
  845. .. rst-class:: classref-method
  846. void **obstacle_set_map** **(** :ref:`RID<class_RID>` obstacle, :ref:`RID<class_RID>` map **)**
  847. Assigns the ``obstacle`` to a navigation map.
  848. .. rst-class:: classref-item-separator
  849. ----
  850. .. _class_NavigationServer3D_method_obstacle_set_paused:
  851. .. rst-class:: classref-method
  852. void **obstacle_set_paused** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` paused **)**
  853. If ``paused`` is true the specified ``obstacle`` will not be processed, e.g. affect avoidance velocities.
  854. .. rst-class:: classref-item-separator
  855. ----
  856. .. _class_NavigationServer3D_method_obstacle_set_position:
  857. .. rst-class:: classref-method
  858. void **obstacle_set_position** **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` position **)**
  859. Updates the ``position`` in world space for the ``obstacle``.
  860. .. rst-class:: classref-item-separator
  861. ----
  862. .. _class_NavigationServer3D_method_obstacle_set_radius:
  863. .. rst-class:: classref-method
  864. void **obstacle_set_radius** **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` radius **)**
  865. Sets the radius of the dynamic obstacle.
  866. .. rst-class:: classref-item-separator
  867. ----
  868. .. _class_NavigationServer3D_method_obstacle_set_use_3d_avoidance:
  869. .. rst-class:: classref-method
  870. void **obstacle_set_use_3d_avoidance** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)**
  871. Sets if the ``obstacle`` uses the 2D avoidance or the 3D avoidance while avoidance is enabled.
  872. .. rst-class:: classref-item-separator
  873. ----
  874. .. _class_NavigationServer3D_method_obstacle_set_velocity:
  875. .. rst-class:: classref-method
  876. void **obstacle_set_velocity** **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` velocity **)**
  877. Sets ``velocity`` of the dynamic ``obstacle``. Allows other agents to better predict the movement of the dynamic obstacle. Only works in combination with the radius of the obstacle.
  878. .. rst-class:: classref-item-separator
  879. ----
  880. .. _class_NavigationServer3D_method_obstacle_set_vertices:
  881. .. rst-class:: classref-method
  882. void **obstacle_set_vertices** **(** :ref:`RID<class_RID>` obstacle, :ref:`PackedVector3Array<class_PackedVector3Array>` vertices **)**
  883. Sets the outline vertices for the obstacle. If the vertices are winded in clockwise order agents will be pushed in by the obstacle, else they will be pushed out.
  884. .. rst-class:: classref-item-separator
  885. ----
  886. .. _class_NavigationServer3D_method_parse_source_geometry_data:
  887. .. rst-class:: classref-method
  888. void **parse_source_geometry_data** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` source_geometry_data, :ref:`Node<class_Node>` root_node, :ref:`Callable<class_Callable>` callback=Callable() **)**
  889. Parses the :ref:`SceneTree<class_SceneTree>` for source geometry according to the properties of ``navigation_mesh``. Updates the provided ``source_geometry_data`` resource with the resulting data. The resource can then be used to bake a navigation mesh with :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>`. After the process is finished the optional ``callback`` will be called.
  890. \ **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe.
  891. \ **Performance:** While convenient, reading data arrays from :ref:`Mesh<class_Mesh>` resources can affect the frame rate negatively. The data needs to be received from the GPU, stalling the :ref:`RenderingServer<class_RenderingServer>` in the process. For performance prefer the use of e.g. collision shapes or creating the data arrays entirely in code.
  892. .. rst-class:: classref-item-separator
  893. ----
  894. .. _class_NavigationServer3D_method_query_path:
  895. .. rst-class:: classref-method
  896. void **query_path** **(** :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>` parameters, :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` result **)** |const|
  897. Queries a path in a given navigation map. Start and target position and other parameters are defined through :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>`. Updates the provided :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` result object with the path among other results requested by the query.
  898. .. rst-class:: classref-item-separator
  899. ----
  900. .. _class_NavigationServer3D_method_region_bake_navigation_mesh:
  901. .. rst-class:: classref-method
  902. void **region_bake_navigation_mesh** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`Node<class_Node>` root_node **)**
  903. Bakes the ``navigation_mesh`` with bake source geometry collected starting from the ``root_node``.
  904. \ *Deprecated.* This function is deprecated due to core threading changes. To upgrade existing code, first create a :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` resource. Use this resource with :ref:`parse_source_geometry_data<class_NavigationServer3D_method_parse_source_geometry_data>` to parse the SceneTree for nodes that should contribute to the navigation mesh baking. The SceneTree parsing needs to happen on the main thread. After the parsing is finished use the resource with :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>` to bake a navigation mesh.
  905. .. rst-class:: classref-item-separator
  906. ----
  907. .. _class_NavigationServer3D_method_region_create:
  908. .. rst-class:: classref-method
  909. :ref:`RID<class_RID>` **region_create** **(** **)**
  910. Creates a new region.
  911. .. rst-class:: classref-item-separator
  912. ----
  913. .. _class_NavigationServer3D_method_region_get_connection_pathway_end:
  914. .. rst-class:: classref-method
  915. :ref:`Vector3<class_Vector3>` **region_get_connection_pathway_end** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const|
  916. Returns the ending point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>`.
  917. .. rst-class:: classref-item-separator
  918. ----
  919. .. _class_NavigationServer3D_method_region_get_connection_pathway_start:
  920. .. rst-class:: classref-method
  921. :ref:`Vector3<class_Vector3>` **region_get_connection_pathway_start** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const|
  922. Returns the starting point of a connection door. ``connection`` is an index between 0 and the return value of :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>`.
  923. .. rst-class:: classref-item-separator
  924. ----
  925. .. _class_NavigationServer3D_method_region_get_connections_count:
  926. .. rst-class:: classref-method
  927. :ref:`int<class_int>` **region_get_connections_count** **(** :ref:`RID<class_RID>` region **)** |const|
  928. Returns how many connections this ``region`` has with other regions in the map.
  929. .. rst-class:: classref-item-separator
  930. ----
  931. .. _class_NavigationServer3D_method_region_get_enabled:
  932. .. rst-class:: classref-method
  933. :ref:`bool<class_bool>` **region_get_enabled** **(** :ref:`RID<class_RID>` region **)** |const|
  934. Returns ``true`` if the specified ``region`` is enabled.
  935. .. rst-class:: classref-item-separator
  936. ----
  937. .. _class_NavigationServer3D_method_region_get_enter_cost:
  938. .. rst-class:: classref-method
  939. :ref:`float<class_float>` **region_get_enter_cost** **(** :ref:`RID<class_RID>` region **)** |const|
  940. Returns the enter cost of this ``region``.
  941. .. rst-class:: classref-item-separator
  942. ----
  943. .. _class_NavigationServer3D_method_region_get_map:
  944. .. rst-class:: classref-method
  945. :ref:`RID<class_RID>` **region_get_map** **(** :ref:`RID<class_RID>` region **)** |const|
  946. Returns the navigation map :ref:`RID<class_RID>` the requested ``region`` is currently assigned to.
  947. .. rst-class:: classref-item-separator
  948. ----
  949. .. _class_NavigationServer3D_method_region_get_navigation_layers:
  950. .. rst-class:: classref-method
  951. :ref:`int<class_int>` **region_get_navigation_layers** **(** :ref:`RID<class_RID>` region **)** |const|
  952. Returns the region's navigation layers.
  953. .. rst-class:: classref-item-separator
  954. ----
  955. .. _class_NavigationServer3D_method_region_get_owner_id:
  956. .. rst-class:: classref-method
  957. :ref:`int<class_int>` **region_get_owner_id** **(** :ref:`RID<class_RID>` region **)** |const|
  958. Returns the ``ObjectID`` of the object which manages this region.
  959. .. rst-class:: classref-item-separator
  960. ----
  961. .. _class_NavigationServer3D_method_region_get_random_point:
  962. .. rst-class:: classref-method
  963. :ref:`Vector3<class_Vector3>` **region_get_random_point** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers, :ref:`bool<class_bool>` uniformly **)** |const|
  964. Returns a random position picked from all region polygons with matching ``navigation_layers``.
  965. If ``uniformly`` is ``true``, all region polygons and faces are weighted by their surface area (slower).
  966. If ``uniformly`` is ``false``, just a random polygon and face is picked (faster).
  967. .. rst-class:: classref-item-separator
  968. ----
  969. .. _class_NavigationServer3D_method_region_get_travel_cost:
  970. .. rst-class:: classref-method
  971. :ref:`float<class_float>` **region_get_travel_cost** **(** :ref:`RID<class_RID>` region **)** |const|
  972. Returns the travel cost of this ``region``.
  973. .. rst-class:: classref-item-separator
  974. ----
  975. .. _class_NavigationServer3D_method_region_get_use_edge_connections:
  976. .. rst-class:: classref-method
  977. :ref:`bool<class_bool>` **region_get_use_edge_connections** **(** :ref:`RID<class_RID>` region **)** |const|
  978. Returns true if the navigation ``region`` is set to use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
  979. .. rst-class:: classref-item-separator
  980. ----
  981. .. _class_NavigationServer3D_method_region_owns_point:
  982. .. rst-class:: classref-method
  983. :ref:`bool<class_bool>` **region_owns_point** **(** :ref:`RID<class_RID>` region, :ref:`Vector3<class_Vector3>` point **)** |const|
  984. Returns ``true`` if the provided ``point`` in world space is currently owned by the provided navigation ``region``. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
  985. If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
  986. \ **Note:** If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
  987. .. rst-class:: classref-item-separator
  988. ----
  989. .. _class_NavigationServer3D_method_region_set_enabled:
  990. .. rst-class:: classref-method
  991. void **region_set_enabled** **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)**
  992. If ``enabled`` is ``true``, the specified ``region`` will contribute to its current navigation map.
  993. .. rst-class:: classref-item-separator
  994. ----
  995. .. _class_NavigationServer3D_method_region_set_enter_cost:
  996. .. rst-class:: classref-method
  997. void **region_set_enter_cost** **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` enter_cost **)**
  998. Sets the ``enter_cost`` for this ``region``.
  999. .. rst-class:: classref-item-separator
  1000. ----
  1001. .. _class_NavigationServer3D_method_region_set_map:
  1002. .. rst-class:: classref-method
  1003. void **region_set_map** **(** :ref:`RID<class_RID>` region, :ref:`RID<class_RID>` map **)**
  1004. Sets the map for the region.
  1005. .. rst-class:: classref-item-separator
  1006. ----
  1007. .. _class_NavigationServer3D_method_region_set_navigation_layers:
  1008. .. rst-class:: classref-method
  1009. void **region_set_navigation_layers** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)**
  1010. Set the region's navigation layers. This allows selecting regions from a path request (when using :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>`).
  1011. .. rst-class:: classref-item-separator
  1012. ----
  1013. .. _class_NavigationServer3D_method_region_set_navigation_mesh:
  1014. .. rst-class:: classref-method
  1015. void **region_set_navigation_mesh** **(** :ref:`RID<class_RID>` region, :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)**
  1016. Sets the navigation mesh for the region.
  1017. .. rst-class:: classref-item-separator
  1018. ----
  1019. .. _class_NavigationServer3D_method_region_set_owner_id:
  1020. .. rst-class:: classref-method
  1021. void **region_set_owner_id** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)**
  1022. Set the ``ObjectID`` of the object which manages this region.
  1023. .. rst-class:: classref-item-separator
  1024. ----
  1025. .. _class_NavigationServer3D_method_region_set_transform:
  1026. .. rst-class:: classref-method
  1027. void **region_set_transform** **(** :ref:`RID<class_RID>` region, :ref:`Transform3D<class_Transform3D>` transform **)**
  1028. Sets the global transformation for the region.
  1029. .. rst-class:: classref-item-separator
  1030. ----
  1031. .. _class_NavigationServer3D_method_region_set_travel_cost:
  1032. .. rst-class:: classref-method
  1033. void **region_set_travel_cost** **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` travel_cost **)**
  1034. Sets the ``travel_cost`` for this ``region``.
  1035. .. rst-class:: classref-item-separator
  1036. ----
  1037. .. _class_NavigationServer3D_method_region_set_use_edge_connections:
  1038. .. rst-class:: classref-method
  1039. void **region_set_use_edge_connections** **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)**
  1040. If ``enabled`` is ``true``, the navigation ``region`` will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
  1041. .. rst-class:: classref-item-separator
  1042. ----
  1043. .. _class_NavigationServer3D_method_set_active:
  1044. .. rst-class:: classref-method
  1045. void **set_active** **(** :ref:`bool<class_bool>` active **)**
  1046. Control activation of this server.
  1047. .. rst-class:: classref-item-separator
  1048. ----
  1049. .. _class_NavigationServer3D_method_set_debug_enabled:
  1050. .. rst-class:: classref-method
  1051. void **set_debug_enabled** **(** :ref:`bool<class_bool>` enabled **)**
  1052. If ``true`` enables debug mode on the NavigationServer.
  1053. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1054. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1055. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1056. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1057. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1058. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1059. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`