class_navigationserver3d.rst 147 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.2/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.2/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:`RID[]<class_RID>` | :ref:`map_get_regions<class_NavigationServer3D_method_map_get_regions>` **(** :ref:`RID<class_RID>` map **)** |const| |
  160. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | :ref:`Vector3<class_Vector3>` | :ref:`map_get_up<class_NavigationServer3D_method_map_get_up>` **(** :ref:`RID<class_RID>` map **)** |const| |
  162. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | :ref:`bool<class_bool>` | :ref:`map_get_use_edge_connections<class_NavigationServer3D_method_map_get_use_edge_connections>` **(** :ref:`RID<class_RID>` map **)** |const| |
  164. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | :ref:`bool<class_bool>` | :ref:`map_is_active<class_NavigationServer3D_method_map_is_active>` **(** :ref:`RID<class_RID>` map **)** |const| |
  166. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | void | :ref:`map_set_active<class_NavigationServer3D_method_map_set_active>` **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` active **)** |
  168. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | void | :ref:`map_set_cell_height<class_NavigationServer3D_method_map_set_cell_height>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_height **)** |
  170. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | void | :ref:`map_set_cell_size<class_NavigationServer3D_method_map_set_cell_size>` **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_size **)** |
  172. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | 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 **)** |
  174. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | 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 **)** |
  176. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | void | :ref:`map_set_up<class_NavigationServer3D_method_map_set_up>` **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` up **)** |
  178. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. | 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 **)** |
  180. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  181. | :ref:`RID<class_RID>` | :ref:`obstacle_create<class_NavigationServer3D_method_obstacle_create>` **(** **)** |
  182. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  183. | :ref:`bool<class_bool>` | :ref:`obstacle_get_avoidance_enabled<class_NavigationServer3D_method_obstacle_get_avoidance_enabled>` **(** :ref:`RID<class_RID>` obstacle **)** |const| |
  184. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  185. | :ref:`RID<class_RID>` | :ref:`obstacle_get_map<class_NavigationServer3D_method_obstacle_get_map>` **(** :ref:`RID<class_RID>` obstacle **)** |const| |
  186. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  187. | :ref:`bool<class_bool>` | :ref:`obstacle_get_paused<class_NavigationServer3D_method_obstacle_get_paused>` **(** :ref:`RID<class_RID>` obstacle **)** |const| |
  188. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  189. | :ref:`bool<class_bool>` | :ref:`obstacle_get_use_3d_avoidance<class_NavigationServer3D_method_obstacle_get_use_3d_avoidance>` **(** :ref:`RID<class_RID>` obstacle **)** |const| |
  190. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  191. | void | :ref:`obstacle_set_avoidance_enabled<class_NavigationServer3D_method_obstacle_set_avoidance_enabled>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)** |
  192. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  193. | void | :ref:`obstacle_set_avoidance_layers<class_NavigationServer3D_method_obstacle_set_avoidance_layers>` **(** :ref:`RID<class_RID>` obstacle, :ref:`int<class_int>` layers **)** |
  194. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  195. | void | :ref:`obstacle_set_height<class_NavigationServer3D_method_obstacle_set_height>` **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` height **)** |
  196. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  197. | void | :ref:`obstacle_set_map<class_NavigationServer3D_method_obstacle_set_map>` **(** :ref:`RID<class_RID>` obstacle, :ref:`RID<class_RID>` map **)** |
  198. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  199. | void | :ref:`obstacle_set_paused<class_NavigationServer3D_method_obstacle_set_paused>` **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` paused **)** |
  200. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  201. | void | :ref:`obstacle_set_position<class_NavigationServer3D_method_obstacle_set_position>` **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` position **)** |
  202. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  203. | void | :ref:`obstacle_set_radius<class_NavigationServer3D_method_obstacle_set_radius>` **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` radius **)** |
  204. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  205. | 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 **)** |
  206. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  207. | void | :ref:`obstacle_set_velocity<class_NavigationServer3D_method_obstacle_set_velocity>` **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` velocity **)** |
  208. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  209. | void | :ref:`obstacle_set_vertices<class_NavigationServer3D_method_obstacle_set_vertices>` **(** :ref:`RID<class_RID>` obstacle, :ref:`PackedVector3Array<class_PackedVector3Array>` vertices **)** |
  210. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  211. | 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() **)** |
  212. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  213. | void | :ref:`query_path<class_NavigationServer3D_method_query_path>` **(** :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>` parameters, :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` result **)** |const| |
  214. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  215. | 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 **)** |
  216. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  217. | :ref:`RID<class_RID>` | :ref:`region_create<class_NavigationServer3D_method_region_create>` **(** **)** |
  218. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  219. | :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| |
  220. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  221. | :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| |
  222. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  223. | :ref:`int<class_int>` | :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>` **(** :ref:`RID<class_RID>` region **)** |const| |
  224. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  225. | :ref:`bool<class_bool>` | :ref:`region_get_enabled<class_NavigationServer3D_method_region_get_enabled>` **(** :ref:`RID<class_RID>` region **)** |const| |
  226. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  227. | :ref:`float<class_float>` | :ref:`region_get_enter_cost<class_NavigationServer3D_method_region_get_enter_cost>` **(** :ref:`RID<class_RID>` region **)** |const| |
  228. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  229. | :ref:`RID<class_RID>` | :ref:`region_get_map<class_NavigationServer3D_method_region_get_map>` **(** :ref:`RID<class_RID>` region **)** |const| |
  230. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  231. | :ref:`int<class_int>` | :ref:`region_get_navigation_layers<class_NavigationServer3D_method_region_get_navigation_layers>` **(** :ref:`RID<class_RID>` region **)** |const| |
  232. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  233. | :ref:`int<class_int>` | :ref:`region_get_owner_id<class_NavigationServer3D_method_region_get_owner_id>` **(** :ref:`RID<class_RID>` region **)** |const| |
  234. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  235. | :ref:`float<class_float>` | :ref:`region_get_travel_cost<class_NavigationServer3D_method_region_get_travel_cost>` **(** :ref:`RID<class_RID>` region **)** |const| |
  236. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  237. | :ref:`bool<class_bool>` | :ref:`region_get_use_edge_connections<class_NavigationServer3D_method_region_get_use_edge_connections>` **(** :ref:`RID<class_RID>` region **)** |const| |
  238. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  239. | :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| |
  240. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  241. | void | :ref:`region_set_enabled<class_NavigationServer3D_method_region_set_enabled>` **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)** |
  242. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  243. | void | :ref:`region_set_enter_cost<class_NavigationServer3D_method_region_set_enter_cost>` **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` enter_cost **)** |
  244. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  245. | void | :ref:`region_set_map<class_NavigationServer3D_method_region_set_map>` **(** :ref:`RID<class_RID>` region, :ref:`RID<class_RID>` map **)** |
  246. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  247. | void | :ref:`region_set_navigation_layers<class_NavigationServer3D_method_region_set_navigation_layers>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)** |
  248. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  249. | void | :ref:`region_set_navigation_mesh<class_NavigationServer3D_method_region_set_navigation_mesh>` **(** :ref:`RID<class_RID>` region, :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)** |
  250. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  251. | void | :ref:`region_set_owner_id<class_NavigationServer3D_method_region_set_owner_id>` **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)** |
  252. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  253. | void | :ref:`region_set_transform<class_NavigationServer3D_method_region_set_transform>` **(** :ref:`RID<class_RID>` region, :ref:`Transform3D<class_Transform3D>` transform **)** |
  254. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  255. | void | :ref:`region_set_travel_cost<class_NavigationServer3D_method_region_set_travel_cost>` **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` travel_cost **)** |
  256. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  257. | 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 **)** |
  258. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  259. | void | :ref:`set_active<class_NavigationServer3D_method_set_active>` **(** :ref:`bool<class_bool>` active **)** |
  260. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  261. | void | :ref:`set_debug_enabled<class_NavigationServer3D_method_set_debug_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
  262. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  263. .. rst-class:: classref-section-separator
  264. ----
  265. .. rst-class:: classref-descriptions-group
  266. Signals
  267. -------
  268. .. _class_NavigationServer3D_signal_avoidance_debug_changed:
  269. .. rst-class:: classref-signal
  270. **avoidance_debug_changed** **(** **)**
  271. Emitted when avoidance debug settings are changed. Only available in debug builds.
  272. .. rst-class:: classref-item-separator
  273. ----
  274. .. _class_NavigationServer3D_signal_map_changed:
  275. .. rst-class:: classref-signal
  276. **map_changed** **(** :ref:`RID<class_RID>` map **)**
  277. Emitted when a navigation map is updated, when a region moves or is modified.
  278. .. rst-class:: classref-item-separator
  279. ----
  280. .. _class_NavigationServer3D_signal_navigation_debug_changed:
  281. .. rst-class:: classref-signal
  282. **navigation_debug_changed** **(** **)**
  283. Emitted when navigation debug settings are changed. Only available in debug builds.
  284. .. rst-class:: classref-section-separator
  285. ----
  286. .. rst-class:: classref-descriptions-group
  287. Enumerations
  288. ------------
  289. .. _enum_NavigationServer3D_ProcessInfo:
  290. .. rst-class:: classref-enumeration
  291. enum **ProcessInfo**:
  292. .. _class_NavigationServer3D_constant_INFO_ACTIVE_MAPS:
  293. .. rst-class:: classref-enumeration-constant
  294. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_ACTIVE_MAPS** = ``0``
  295. Constant to get the number of active navigation maps.
  296. .. _class_NavigationServer3D_constant_INFO_REGION_COUNT:
  297. .. rst-class:: classref-enumeration-constant
  298. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_REGION_COUNT** = ``1``
  299. Constant to get the number of active navigation regions.
  300. .. _class_NavigationServer3D_constant_INFO_AGENT_COUNT:
  301. .. rst-class:: classref-enumeration-constant
  302. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_AGENT_COUNT** = ``2``
  303. Constant to get the number of active navigation agents processing avoidance.
  304. .. _class_NavigationServer3D_constant_INFO_LINK_COUNT:
  305. .. rst-class:: classref-enumeration-constant
  306. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_LINK_COUNT** = ``3``
  307. Constant to get the number of active navigation links.
  308. .. _class_NavigationServer3D_constant_INFO_POLYGON_COUNT:
  309. .. rst-class:: classref-enumeration-constant
  310. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_POLYGON_COUNT** = ``4``
  311. Constant to get the number of navigation mesh polygons.
  312. .. _class_NavigationServer3D_constant_INFO_EDGE_COUNT:
  313. .. rst-class:: classref-enumeration-constant
  314. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_COUNT** = ``5``
  315. Constant to get the number of navigation mesh polygon edges.
  316. .. _class_NavigationServer3D_constant_INFO_EDGE_MERGE_COUNT:
  317. .. rst-class:: classref-enumeration-constant
  318. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_MERGE_COUNT** = ``6``
  319. Constant to get the number of navigation mesh polygon edges that were merged due to edge key overlap.
  320. .. _class_NavigationServer3D_constant_INFO_EDGE_CONNECTION_COUNT:
  321. .. rst-class:: classref-enumeration-constant
  322. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_CONNECTION_COUNT** = ``7``
  323. Constant to get the number of navigation mesh polygon edges that are considered connected by edge proximity.
  324. .. _class_NavigationServer3D_constant_INFO_EDGE_FREE_COUNT:
  325. .. rst-class:: classref-enumeration-constant
  326. :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_FREE_COUNT** = ``8``
  327. 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.
  328. .. rst-class:: classref-section-separator
  329. ----
  330. .. rst-class:: classref-descriptions-group
  331. Method Descriptions
  332. -------------------
  333. .. _class_NavigationServer3D_method_agent_create:
  334. .. rst-class:: classref-method
  335. :ref:`RID<class_RID>` **agent_create** **(** **)**
  336. Creates the agent.
  337. .. rst-class:: classref-item-separator
  338. ----
  339. .. _class_NavigationServer3D_method_agent_get_avoidance_enabled:
  340. .. rst-class:: classref-method
  341. :ref:`bool<class_bool>` **agent_get_avoidance_enabled** **(** :ref:`RID<class_RID>` agent **)** |const|
  342. Returns ``true`` if the provided ``agent`` has avoidance enabled.
  343. .. rst-class:: classref-item-separator
  344. ----
  345. .. _class_NavigationServer3D_method_agent_get_map:
  346. .. rst-class:: classref-method
  347. :ref:`RID<class_RID>` **agent_get_map** **(** :ref:`RID<class_RID>` agent **)** |const|
  348. Returns the navigation map :ref:`RID<class_RID>` the requested ``agent`` is currently assigned to.
  349. .. rst-class:: classref-item-separator
  350. ----
  351. .. _class_NavigationServer3D_method_agent_get_paused:
  352. .. rst-class:: classref-method
  353. :ref:`bool<class_bool>` **agent_get_paused** **(** :ref:`RID<class_RID>` agent **)** |const|
  354. Returns ``true`` if the specified ``agent`` is paused.
  355. .. rst-class:: classref-item-separator
  356. ----
  357. .. _class_NavigationServer3D_method_agent_get_use_3d_avoidance:
  358. .. rst-class:: classref-method
  359. :ref:`bool<class_bool>` **agent_get_use_3d_avoidance** **(** :ref:`RID<class_RID>` agent **)** |const|
  360. 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).
  361. .. rst-class:: classref-item-separator
  362. ----
  363. .. _class_NavigationServer3D_method_agent_is_map_changed:
  364. .. rst-class:: classref-method
  365. :ref:`bool<class_bool>` **agent_is_map_changed** **(** :ref:`RID<class_RID>` agent **)** |const|
  366. Returns true if the map got changed the previous frame.
  367. .. rst-class:: classref-item-separator
  368. ----
  369. .. _class_NavigationServer3D_method_agent_set_avoidance_callback:
  370. .. rst-class:: classref-method
  371. void **agent_set_avoidance_callback** **(** :ref:`RID<class_RID>` agent, :ref:`Callable<class_Callable>` callback **)**
  372. 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.
  373. \ **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>`.
  374. .. rst-class:: classref-item-separator
  375. ----
  376. .. _class_NavigationServer3D_method_agent_set_avoidance_enabled:
  377. .. rst-class:: classref-method
  378. void **agent_set_avoidance_enabled** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)**
  379. If ``enabled`` is ``true``, the provided ``agent`` calculates avoidance.
  380. .. rst-class:: classref-item-separator
  381. ----
  382. .. _class_NavigationServer3D_method_agent_set_avoidance_layers:
  383. .. rst-class:: classref-method
  384. void **agent_set_avoidance_layers** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` layers **)**
  385. Set the agent's ``avoidance_layers`` bitmask.
  386. .. rst-class:: classref-item-separator
  387. ----
  388. .. _class_NavigationServer3D_method_agent_set_avoidance_mask:
  389. .. rst-class:: classref-method
  390. void **agent_set_avoidance_mask** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` mask **)**
  391. Set the agent's ``avoidance_mask`` bitmask.
  392. .. rst-class:: classref-item-separator
  393. ----
  394. .. _class_NavigationServer3D_method_agent_set_avoidance_priority:
  395. .. rst-class:: classref-method
  396. void **agent_set_avoidance_priority** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` priority **)**
  397. Set the agent's ``avoidance_priority`` with a ``priority`` between 0.0 (lowest priority) to 1.0 (highest priority).
  398. 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.
  399. .. rst-class:: classref-item-separator
  400. ----
  401. .. _class_NavigationServer3D_method_agent_set_height:
  402. .. rst-class:: classref-method
  403. void **agent_set_height** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` height **)**
  404. Updates the provided ``agent`` ``height``.
  405. .. rst-class:: classref-item-separator
  406. ----
  407. .. _class_NavigationServer3D_method_agent_set_map:
  408. .. rst-class:: classref-method
  409. void **agent_set_map** **(** :ref:`RID<class_RID>` agent, :ref:`RID<class_RID>` map **)**
  410. Puts the agent in the map.
  411. .. rst-class:: classref-item-separator
  412. ----
  413. .. _class_NavigationServer3D_method_agent_set_max_neighbors:
  414. .. rst-class:: classref-method
  415. void **agent_set_max_neighbors** **(** :ref:`RID<class_RID>` agent, :ref:`int<class_int>` count **)**
  416. 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.
  417. .. rst-class:: classref-item-separator
  418. ----
  419. .. _class_NavigationServer3D_method_agent_set_max_speed:
  420. .. rst-class:: classref-method
  421. void **agent_set_max_speed** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` max_speed **)**
  422. Sets the maximum speed of the agent. Must be positive.
  423. .. rst-class:: classref-item-separator
  424. ----
  425. .. _class_NavigationServer3D_method_agent_set_neighbor_distance:
  426. .. rst-class:: classref-method
  427. void **agent_set_neighbor_distance** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` distance **)**
  428. 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.
  429. .. rst-class:: classref-item-separator
  430. ----
  431. .. _class_NavigationServer3D_method_agent_set_paused:
  432. .. rst-class:: classref-method
  433. void **agent_set_paused** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` paused **)**
  434. If ``paused`` is true the specified ``agent`` will not be processed, e.g. calculate avoidance velocities or receive avoidance callbacks.
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_NavigationServer3D_method_agent_set_position:
  438. .. rst-class:: classref-method
  439. void **agent_set_position** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` position **)**
  440. Sets the position of the agent in world space.
  441. .. rst-class:: classref-item-separator
  442. ----
  443. .. _class_NavigationServer3D_method_agent_set_radius:
  444. .. rst-class:: classref-method
  445. void **agent_set_radius** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` radius **)**
  446. Sets the radius of the agent.
  447. .. rst-class:: classref-item-separator
  448. ----
  449. .. _class_NavigationServer3D_method_agent_set_time_horizon_agents:
  450. .. rst-class:: classref-method
  451. void **agent_set_time_horizon_agents** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)**
  452. 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.
  453. .. rst-class:: classref-item-separator
  454. ----
  455. .. _class_NavigationServer3D_method_agent_set_time_horizon_obstacles:
  456. .. rst-class:: classref-method
  457. void **agent_set_time_horizon_obstacles** **(** :ref:`RID<class_RID>` agent, :ref:`float<class_float>` time_horizon **)**
  458. 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.
  459. .. rst-class:: classref-item-separator
  460. ----
  461. .. _class_NavigationServer3D_method_agent_set_use_3d_avoidance:
  462. .. rst-class:: classref-method
  463. void **agent_set_use_3d_avoidance** **(** :ref:`RID<class_RID>` agent, :ref:`bool<class_bool>` enabled **)**
  464. Sets if the agent uses the 2D avoidance or the 3D avoidance while avoidance is enabled.
  465. If ``true`` the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, underwater 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.
  466. 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.
  467. .. rst-class:: classref-item-separator
  468. ----
  469. .. _class_NavigationServer3D_method_agent_set_velocity:
  470. .. rst-class:: classref-method
  471. void **agent_set_velocity** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)**
  472. 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.
  473. .. rst-class:: classref-item-separator
  474. ----
  475. .. _class_NavigationServer3D_method_agent_set_velocity_forced:
  476. .. rst-class:: classref-method
  477. void **agent_set_velocity_forced** **(** :ref:`RID<class_RID>` agent, :ref:`Vector3<class_Vector3>` velocity **)**
  478. 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.
  479. .. rst-class:: classref-item-separator
  480. ----
  481. .. _class_NavigationServer3D_method_bake_from_source_geometry_data:
  482. .. rst-class:: classref-method
  483. 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() **)**
  484. 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.
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _class_NavigationServer3D_method_bake_from_source_geometry_data_async:
  488. .. rst-class:: classref-method
  489. 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() **)**
  490. 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.
  491. .. rst-class:: classref-item-separator
  492. ----
  493. .. _class_NavigationServer3D_method_free_rid:
  494. .. rst-class:: classref-method
  495. void **free_rid** **(** :ref:`RID<class_RID>` rid **)**
  496. Destroys the given RID.
  497. .. rst-class:: classref-item-separator
  498. ----
  499. .. _class_NavigationServer3D_method_get_debug_enabled:
  500. .. rst-class:: classref-method
  501. :ref:`bool<class_bool>` **get_debug_enabled** **(** **)** |const|
  502. Returns ``true`` when the NavigationServer has debug enabled.
  503. .. rst-class:: classref-item-separator
  504. ----
  505. .. _class_NavigationServer3D_method_get_maps:
  506. .. rst-class:: classref-method
  507. :ref:`RID[]<class_RID>` **get_maps** **(** **)** |const|
  508. 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.
  509. .. rst-class:: classref-item-separator
  510. ----
  511. .. _class_NavigationServer3D_method_get_process_info:
  512. .. rst-class:: classref-method
  513. :ref:`int<class_int>` **get_process_info** **(** :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` process_info **)** |const|
  514. Returns information about the current state of the NavigationServer. See :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` for a list of available states.
  515. .. rst-class:: classref-item-separator
  516. ----
  517. .. _class_NavigationServer3D_method_link_create:
  518. .. rst-class:: classref-method
  519. :ref:`RID<class_RID>` **link_create** **(** **)**
  520. Create a new link between two positions on a map.
  521. .. rst-class:: classref-item-separator
  522. ----
  523. .. _class_NavigationServer3D_method_link_get_enabled:
  524. .. rst-class:: classref-method
  525. :ref:`bool<class_bool>` **link_get_enabled** **(** :ref:`RID<class_RID>` link **)** |const|
  526. Returns ``true`` if the specified ``link`` is enabled.
  527. .. rst-class:: classref-item-separator
  528. ----
  529. .. _class_NavigationServer3D_method_link_get_end_position:
  530. .. rst-class:: classref-method
  531. :ref:`Vector3<class_Vector3>` **link_get_end_position** **(** :ref:`RID<class_RID>` link **)** |const|
  532. Returns the ending position of this ``link``.
  533. .. rst-class:: classref-item-separator
  534. ----
  535. .. _class_NavigationServer3D_method_link_get_enter_cost:
  536. .. rst-class:: classref-method
  537. :ref:`float<class_float>` **link_get_enter_cost** **(** :ref:`RID<class_RID>` link **)** |const|
  538. Returns the enter cost of this ``link``.
  539. .. rst-class:: classref-item-separator
  540. ----
  541. .. _class_NavigationServer3D_method_link_get_map:
  542. .. rst-class:: classref-method
  543. :ref:`RID<class_RID>` **link_get_map** **(** :ref:`RID<class_RID>` link **)** |const|
  544. Returns the navigation map :ref:`RID<class_RID>` the requested ``link`` is currently assigned to.
  545. .. rst-class:: classref-item-separator
  546. ----
  547. .. _class_NavigationServer3D_method_link_get_navigation_layers:
  548. .. rst-class:: classref-method
  549. :ref:`int<class_int>` **link_get_navigation_layers** **(** :ref:`RID<class_RID>` link **)** |const|
  550. Returns the navigation layers for this ``link``.
  551. .. rst-class:: classref-item-separator
  552. ----
  553. .. _class_NavigationServer3D_method_link_get_owner_id:
  554. .. rst-class:: classref-method
  555. :ref:`int<class_int>` **link_get_owner_id** **(** :ref:`RID<class_RID>` link **)** |const|
  556. Returns the ``ObjectID`` of the object which manages this link.
  557. .. rst-class:: classref-item-separator
  558. ----
  559. .. _class_NavigationServer3D_method_link_get_start_position:
  560. .. rst-class:: classref-method
  561. :ref:`Vector3<class_Vector3>` **link_get_start_position** **(** :ref:`RID<class_RID>` link **)** |const|
  562. Returns the starting position of this ``link``.
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _class_NavigationServer3D_method_link_get_travel_cost:
  566. .. rst-class:: classref-method
  567. :ref:`float<class_float>` **link_get_travel_cost** **(** :ref:`RID<class_RID>` link **)** |const|
  568. Returns the travel cost of this ``link``.
  569. .. rst-class:: classref-item-separator
  570. ----
  571. .. _class_NavigationServer3D_method_link_is_bidirectional:
  572. .. rst-class:: classref-method
  573. :ref:`bool<class_bool>` **link_is_bidirectional** **(** :ref:`RID<class_RID>` link **)** |const|
  574. Returns whether this ``link`` can be travelled in both directions.
  575. .. rst-class:: classref-item-separator
  576. ----
  577. .. _class_NavigationServer3D_method_link_set_bidirectional:
  578. .. rst-class:: classref-method
  579. void **link_set_bidirectional** **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` bidirectional **)**
  580. Sets whether this ``link`` can be travelled in both directions.
  581. .. rst-class:: classref-item-separator
  582. ----
  583. .. _class_NavigationServer3D_method_link_set_enabled:
  584. .. rst-class:: classref-method
  585. void **link_set_enabled** **(** :ref:`RID<class_RID>` link, :ref:`bool<class_bool>` enabled **)**
  586. If ``enabled`` is ``true``, the specified ``link`` will contribute to its current navigation map.
  587. .. rst-class:: classref-item-separator
  588. ----
  589. .. _class_NavigationServer3D_method_link_set_end_position:
  590. .. rst-class:: classref-method
  591. void **link_set_end_position** **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)**
  592. Sets the exit position for the ``link``.
  593. .. rst-class:: classref-item-separator
  594. ----
  595. .. _class_NavigationServer3D_method_link_set_enter_cost:
  596. .. rst-class:: classref-method
  597. void **link_set_enter_cost** **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` enter_cost **)**
  598. Sets the ``enter_cost`` for this ``link``.
  599. .. rst-class:: classref-item-separator
  600. ----
  601. .. _class_NavigationServer3D_method_link_set_map:
  602. .. rst-class:: classref-method
  603. void **link_set_map** **(** :ref:`RID<class_RID>` link, :ref:`RID<class_RID>` map **)**
  604. Sets the navigation map :ref:`RID<class_RID>` for the link.
  605. .. rst-class:: classref-item-separator
  606. ----
  607. .. _class_NavigationServer3D_method_link_set_navigation_layers:
  608. .. rst-class:: classref-method
  609. void **link_set_navigation_layers** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` navigation_layers **)**
  610. 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>`).
  611. .. rst-class:: classref-item-separator
  612. ----
  613. .. _class_NavigationServer3D_method_link_set_owner_id:
  614. .. rst-class:: classref-method
  615. void **link_set_owner_id** **(** :ref:`RID<class_RID>` link, :ref:`int<class_int>` owner_id **)**
  616. Set the ``ObjectID`` of the object which manages this link.
  617. .. rst-class:: classref-item-separator
  618. ----
  619. .. _class_NavigationServer3D_method_link_set_start_position:
  620. .. rst-class:: classref-method
  621. void **link_set_start_position** **(** :ref:`RID<class_RID>` link, :ref:`Vector3<class_Vector3>` position **)**
  622. Sets the entry position for this ``link``.
  623. .. rst-class:: classref-item-separator
  624. ----
  625. .. _class_NavigationServer3D_method_link_set_travel_cost:
  626. .. rst-class:: classref-method
  627. void **link_set_travel_cost** **(** :ref:`RID<class_RID>` link, :ref:`float<class_float>` travel_cost **)**
  628. Sets the ``travel_cost`` for this ``link``.
  629. .. rst-class:: classref-item-separator
  630. ----
  631. .. _class_NavigationServer3D_method_map_create:
  632. .. rst-class:: classref-method
  633. :ref:`RID<class_RID>` **map_create** **(** **)**
  634. Create a new map.
  635. .. rst-class:: classref-item-separator
  636. ----
  637. .. _class_NavigationServer3D_method_map_force_update:
  638. .. rst-class:: classref-method
  639. void **map_force_update** **(** :ref:`RID<class_RID>` map **)**
  640. 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).
  641. 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.
  642. Avoidance processing and dispatch of the ``safe_velocity`` signals is unaffected by this function and continues to happen for all maps and agents at the end of the physics frame.
  643. \ **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.
  644. .. rst-class:: classref-item-separator
  645. ----
  646. .. _class_NavigationServer3D_method_map_get_agents:
  647. .. rst-class:: classref-method
  648. :ref:`RID[]<class_RID>` **map_get_agents** **(** :ref:`RID<class_RID>` map **)** |const|
  649. Returns all navigation agents :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``.
  650. .. rst-class:: classref-item-separator
  651. ----
  652. .. _class_NavigationServer3D_method_map_get_cell_height:
  653. .. rst-class:: classref-method
  654. :ref:`float<class_float>` **map_get_cell_height** **(** :ref:`RID<class_RID>` map **)** |const|
  655. Returns the map cell height used to rasterize the navigation mesh vertices on the Y axis.
  656. .. rst-class:: classref-item-separator
  657. ----
  658. .. _class_NavigationServer3D_method_map_get_cell_size:
  659. .. rst-class:: classref-method
  660. :ref:`float<class_float>` **map_get_cell_size** **(** :ref:`RID<class_RID>` map **)** |const|
  661. Returns the map cell size used to rasterize the navigation mesh vertices on the XZ plane.
  662. .. rst-class:: classref-item-separator
  663. ----
  664. .. _class_NavigationServer3D_method_map_get_closest_point:
  665. .. rst-class:: classref-method
  666. :ref:`Vector3<class_Vector3>` **map_get_closest_point** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const|
  667. Returns the point closest to the provided ``to_point`` on the navigation mesh surface.
  668. .. rst-class:: classref-item-separator
  669. ----
  670. .. _class_NavigationServer3D_method_map_get_closest_point_normal:
  671. .. rst-class:: classref-method
  672. :ref:`Vector3<class_Vector3>` **map_get_closest_point_normal** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const|
  673. Returns the normal for the point returned by :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>`.
  674. .. rst-class:: classref-item-separator
  675. ----
  676. .. _class_NavigationServer3D_method_map_get_closest_point_owner:
  677. .. rst-class:: classref-method
  678. :ref:`RID<class_RID>` **map_get_closest_point_owner** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` to_point **)** |const|
  679. Returns the owner region RID for the point returned by :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>`.
  680. .. rst-class:: classref-item-separator
  681. ----
  682. .. _class_NavigationServer3D_method_map_get_closest_point_to_segment:
  683. .. rst-class:: classref-method
  684. :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|
  685. Returns the closest point between the navigation surface and the segment.
  686. .. rst-class:: classref-item-separator
  687. ----
  688. .. _class_NavigationServer3D_method_map_get_edge_connection_margin:
  689. .. rst-class:: classref-method
  690. :ref:`float<class_float>` **map_get_edge_connection_margin** **(** :ref:`RID<class_RID>` map **)** |const|
  691. Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions.
  692. .. rst-class:: classref-item-separator
  693. ----
  694. .. _class_NavigationServer3D_method_map_get_link_connection_radius:
  695. .. rst-class:: classref-method
  696. :ref:`float<class_float>` **map_get_link_connection_radius** **(** :ref:`RID<class_RID>` map **)** |const|
  697. 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.
  698. .. rst-class:: classref-item-separator
  699. ----
  700. .. _class_NavigationServer3D_method_map_get_links:
  701. .. rst-class:: classref-method
  702. :ref:`RID[]<class_RID>` **map_get_links** **(** :ref:`RID<class_RID>` map **)** |const|
  703. Returns all navigation link :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``.
  704. .. rst-class:: classref-item-separator
  705. ----
  706. .. _class_NavigationServer3D_method_map_get_obstacles:
  707. .. rst-class:: classref-method
  708. :ref:`RID[]<class_RID>` **map_get_obstacles** **(** :ref:`RID<class_RID>` map **)** |const|
  709. Returns all navigation obstacle :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``.
  710. .. rst-class:: classref-item-separator
  711. ----
  712. .. _class_NavigationServer3D_method_map_get_path:
  713. .. rst-class:: classref-method
  714. :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|
  715. 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.
  716. .. rst-class:: classref-item-separator
  717. ----
  718. .. _class_NavigationServer3D_method_map_get_regions:
  719. .. rst-class:: classref-method
  720. :ref:`RID[]<class_RID>` **map_get_regions** **(** :ref:`RID<class_RID>` map **)** |const|
  721. Returns all navigation regions :ref:`RID<class_RID>`\ s that are currently assigned to the requested navigation ``map``.
  722. .. rst-class:: classref-item-separator
  723. ----
  724. .. _class_NavigationServer3D_method_map_get_up:
  725. .. rst-class:: classref-method
  726. :ref:`Vector3<class_Vector3>` **map_get_up** **(** :ref:`RID<class_RID>` map **)** |const|
  727. Returns the map's up direction.
  728. .. rst-class:: classref-item-separator
  729. ----
  730. .. _class_NavigationServer3D_method_map_get_use_edge_connections:
  731. .. rst-class:: classref-method
  732. :ref:`bool<class_bool>` **map_get_use_edge_connections** **(** :ref:`RID<class_RID>` map **)** |const|
  733. 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.
  734. .. rst-class:: classref-item-separator
  735. ----
  736. .. _class_NavigationServer3D_method_map_is_active:
  737. .. rst-class:: classref-method
  738. :ref:`bool<class_bool>` **map_is_active** **(** :ref:`RID<class_RID>` map **)** |const|
  739. Returns true if the map is active.
  740. .. rst-class:: classref-item-separator
  741. ----
  742. .. _class_NavigationServer3D_method_map_set_active:
  743. .. rst-class:: classref-method
  744. void **map_set_active** **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` active **)**
  745. Sets the map active.
  746. .. rst-class:: classref-item-separator
  747. ----
  748. .. _class_NavigationServer3D_method_map_set_cell_height:
  749. .. rst-class:: classref-method
  750. void **map_set_cell_height** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_height **)**
  751. 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.
  752. .. rst-class:: classref-item-separator
  753. ----
  754. .. _class_NavigationServer3D_method_map_set_cell_size:
  755. .. rst-class:: classref-method
  756. void **map_set_cell_size** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` cell_size **)**
  757. 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.
  758. .. rst-class:: classref-item-separator
  759. ----
  760. .. _class_NavigationServer3D_method_map_set_edge_connection_margin:
  761. .. rst-class:: classref-method
  762. void **map_set_edge_connection_margin** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` margin **)**
  763. Set the map edge connection margin used to weld the compatible region edges.
  764. .. rst-class:: classref-item-separator
  765. ----
  766. .. _class_NavigationServer3D_method_map_set_link_connection_radius:
  767. .. rst-class:: classref-method
  768. void **map_set_link_connection_radius** **(** :ref:`RID<class_RID>` map, :ref:`float<class_float>` radius **)**
  769. Set the map's link connection radius used to connect links to navigation polygons.
  770. .. rst-class:: classref-item-separator
  771. ----
  772. .. _class_NavigationServer3D_method_map_set_up:
  773. .. rst-class:: classref-method
  774. void **map_set_up** **(** :ref:`RID<class_RID>` map, :ref:`Vector3<class_Vector3>` up **)**
  775. Sets the map up direction.
  776. .. rst-class:: classref-item-separator
  777. ----
  778. .. _class_NavigationServer3D_method_map_set_use_edge_connections:
  779. .. rst-class:: classref-method
  780. void **map_set_use_edge_connections** **(** :ref:`RID<class_RID>` map, :ref:`bool<class_bool>` enabled **)**
  781. 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.
  782. .. rst-class:: classref-item-separator
  783. ----
  784. .. _class_NavigationServer3D_method_obstacle_create:
  785. .. rst-class:: classref-method
  786. :ref:`RID<class_RID>` **obstacle_create** **(** **)**
  787. Creates a new obstacle.
  788. .. rst-class:: classref-item-separator
  789. ----
  790. .. _class_NavigationServer3D_method_obstacle_get_avoidance_enabled:
  791. .. rst-class:: classref-method
  792. :ref:`bool<class_bool>` **obstacle_get_avoidance_enabled** **(** :ref:`RID<class_RID>` obstacle **)** |const|
  793. Returns ``true`` if the provided ``obstacle`` has avoidance enabled.
  794. .. rst-class:: classref-item-separator
  795. ----
  796. .. _class_NavigationServer3D_method_obstacle_get_map:
  797. .. rst-class:: classref-method
  798. :ref:`RID<class_RID>` **obstacle_get_map** **(** :ref:`RID<class_RID>` obstacle **)** |const|
  799. Returns the navigation map :ref:`RID<class_RID>` the requested ``obstacle`` is currently assigned to.
  800. .. rst-class:: classref-item-separator
  801. ----
  802. .. _class_NavigationServer3D_method_obstacle_get_paused:
  803. .. rst-class:: classref-method
  804. :ref:`bool<class_bool>` **obstacle_get_paused** **(** :ref:`RID<class_RID>` obstacle **)** |const|
  805. Returns ``true`` if the specified ``obstacle`` is paused.
  806. .. rst-class:: classref-item-separator
  807. ----
  808. .. _class_NavigationServer3D_method_obstacle_get_use_3d_avoidance:
  809. .. rst-class:: classref-method
  810. :ref:`bool<class_bool>` **obstacle_get_use_3d_avoidance** **(** :ref:`RID<class_RID>` obstacle **)** |const|
  811. 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).
  812. .. rst-class:: classref-item-separator
  813. ----
  814. .. _class_NavigationServer3D_method_obstacle_set_avoidance_enabled:
  815. .. rst-class:: classref-method
  816. void **obstacle_set_avoidance_enabled** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)**
  817. If ``enabled`` is ``true``, the provided ``obstacle`` affects avoidance using agents.
  818. .. rst-class:: classref-item-separator
  819. ----
  820. .. _class_NavigationServer3D_method_obstacle_set_avoidance_layers:
  821. .. rst-class:: classref-method
  822. void **obstacle_set_avoidance_layers** **(** :ref:`RID<class_RID>` obstacle, :ref:`int<class_int>` layers **)**
  823. Set the obstacles's ``avoidance_layers`` bitmask.
  824. .. rst-class:: classref-item-separator
  825. ----
  826. .. _class_NavigationServer3D_method_obstacle_set_height:
  827. .. rst-class:: classref-method
  828. void **obstacle_set_height** **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` height **)**
  829. Sets the ``height`` for the ``obstacle``. In 3D agents will ignore obstacles that are above or below them while using 2D avoidance.
  830. .. rst-class:: classref-item-separator
  831. ----
  832. .. _class_NavigationServer3D_method_obstacle_set_map:
  833. .. rst-class:: classref-method
  834. void **obstacle_set_map** **(** :ref:`RID<class_RID>` obstacle, :ref:`RID<class_RID>` map **)**
  835. Assigns the ``obstacle`` to a navigation map.
  836. .. rst-class:: classref-item-separator
  837. ----
  838. .. _class_NavigationServer3D_method_obstacle_set_paused:
  839. .. rst-class:: classref-method
  840. void **obstacle_set_paused** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` paused **)**
  841. If ``paused`` is true the specified ``obstacle`` will not be processed, e.g. affect avoidance velocities.
  842. .. rst-class:: classref-item-separator
  843. ----
  844. .. _class_NavigationServer3D_method_obstacle_set_position:
  845. .. rst-class:: classref-method
  846. void **obstacle_set_position** **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` position **)**
  847. Updates the ``position`` in world space for the ``obstacle``.
  848. .. rst-class:: classref-item-separator
  849. ----
  850. .. _class_NavigationServer3D_method_obstacle_set_radius:
  851. .. rst-class:: classref-method
  852. void **obstacle_set_radius** **(** :ref:`RID<class_RID>` obstacle, :ref:`float<class_float>` radius **)**
  853. Sets the radius of the dynamic obstacle.
  854. .. rst-class:: classref-item-separator
  855. ----
  856. .. _class_NavigationServer3D_method_obstacle_set_use_3d_avoidance:
  857. .. rst-class:: classref-method
  858. void **obstacle_set_use_3d_avoidance** **(** :ref:`RID<class_RID>` obstacle, :ref:`bool<class_bool>` enabled **)**
  859. Sets if the ``obstacle`` uses the 2D avoidance or the 3D avoidance while avoidance is enabled.
  860. .. rst-class:: classref-item-separator
  861. ----
  862. .. _class_NavigationServer3D_method_obstacle_set_velocity:
  863. .. rst-class:: classref-method
  864. void **obstacle_set_velocity** **(** :ref:`RID<class_RID>` obstacle, :ref:`Vector3<class_Vector3>` velocity **)**
  865. 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.
  866. .. rst-class:: classref-item-separator
  867. ----
  868. .. _class_NavigationServer3D_method_obstacle_set_vertices:
  869. .. rst-class:: classref-method
  870. void **obstacle_set_vertices** **(** :ref:`RID<class_RID>` obstacle, :ref:`PackedVector3Array<class_PackedVector3Array>` vertices **)**
  871. 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.
  872. .. rst-class:: classref-item-separator
  873. ----
  874. .. _class_NavigationServer3D_method_parse_source_geometry_data:
  875. .. rst-class:: classref-method
  876. 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() **)**
  877. 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.
  878. \ **Note:** This function needs to run on the main thread or with a deferred call as the SceneTree is not thread-safe.
  879. \ **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.
  880. .. rst-class:: classref-item-separator
  881. ----
  882. .. _class_NavigationServer3D_method_query_path:
  883. .. rst-class:: classref-method
  884. void **query_path** **(** :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>` parameters, :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>` result **)** |const|
  885. 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.
  886. .. rst-class:: classref-item-separator
  887. ----
  888. .. _class_NavigationServer3D_method_region_bake_navigation_mesh:
  889. .. rst-class:: classref-method
  890. void **region_bake_navigation_mesh** **(** :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh, :ref:`Node<class_Node>` root_node **)**
  891. Bakes the ``navigation_mesh`` with bake source geometry collected starting from the ``root_node``.
  892. \ *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.
  893. .. rst-class:: classref-item-separator
  894. ----
  895. .. _class_NavigationServer3D_method_region_create:
  896. .. rst-class:: classref-method
  897. :ref:`RID<class_RID>` **region_create** **(** **)**
  898. Creates a new region.
  899. .. rst-class:: classref-item-separator
  900. ----
  901. .. _class_NavigationServer3D_method_region_get_connection_pathway_end:
  902. .. rst-class:: classref-method
  903. :ref:`Vector3<class_Vector3>` **region_get_connection_pathway_end** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const|
  904. 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>`.
  905. .. rst-class:: classref-item-separator
  906. ----
  907. .. _class_NavigationServer3D_method_region_get_connection_pathway_start:
  908. .. rst-class:: classref-method
  909. :ref:`Vector3<class_Vector3>` **region_get_connection_pathway_start** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` connection **)** |const|
  910. 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>`.
  911. .. rst-class:: classref-item-separator
  912. ----
  913. .. _class_NavigationServer3D_method_region_get_connections_count:
  914. .. rst-class:: classref-method
  915. :ref:`int<class_int>` **region_get_connections_count** **(** :ref:`RID<class_RID>` region **)** |const|
  916. Returns how many connections this ``region`` has with other regions in the map.
  917. .. rst-class:: classref-item-separator
  918. ----
  919. .. _class_NavigationServer3D_method_region_get_enabled:
  920. .. rst-class:: classref-method
  921. :ref:`bool<class_bool>` **region_get_enabled** **(** :ref:`RID<class_RID>` region **)** |const|
  922. Returns ``true`` if the specified ``region`` is enabled.
  923. .. rst-class:: classref-item-separator
  924. ----
  925. .. _class_NavigationServer3D_method_region_get_enter_cost:
  926. .. rst-class:: classref-method
  927. :ref:`float<class_float>` **region_get_enter_cost** **(** :ref:`RID<class_RID>` region **)** |const|
  928. Returns the enter cost of this ``region``.
  929. .. rst-class:: classref-item-separator
  930. ----
  931. .. _class_NavigationServer3D_method_region_get_map:
  932. .. rst-class:: classref-method
  933. :ref:`RID<class_RID>` **region_get_map** **(** :ref:`RID<class_RID>` region **)** |const|
  934. Returns the navigation map :ref:`RID<class_RID>` the requested ``region`` is currently assigned to.
  935. .. rst-class:: classref-item-separator
  936. ----
  937. .. _class_NavigationServer3D_method_region_get_navigation_layers:
  938. .. rst-class:: classref-method
  939. :ref:`int<class_int>` **region_get_navigation_layers** **(** :ref:`RID<class_RID>` region **)** |const|
  940. Returns the region's navigation layers.
  941. .. rst-class:: classref-item-separator
  942. ----
  943. .. _class_NavigationServer3D_method_region_get_owner_id:
  944. .. rst-class:: classref-method
  945. :ref:`int<class_int>` **region_get_owner_id** **(** :ref:`RID<class_RID>` region **)** |const|
  946. Returns the ``ObjectID`` of the object which manages this region.
  947. .. rst-class:: classref-item-separator
  948. ----
  949. .. _class_NavigationServer3D_method_region_get_travel_cost:
  950. .. rst-class:: classref-method
  951. :ref:`float<class_float>` **region_get_travel_cost** **(** :ref:`RID<class_RID>` region **)** |const|
  952. Returns the travel cost of this ``region``.
  953. .. rst-class:: classref-item-separator
  954. ----
  955. .. _class_NavigationServer3D_method_region_get_use_edge_connections:
  956. .. rst-class:: classref-method
  957. :ref:`bool<class_bool>` **region_get_use_edge_connections** **(** :ref:`RID<class_RID>` region **)** |const|
  958. 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.
  959. .. rst-class:: classref-item-separator
  960. ----
  961. .. _class_NavigationServer3D_method_region_owns_point:
  962. .. rst-class:: classref-method
  963. :ref:`bool<class_bool>` **region_owns_point** **(** :ref:`RID<class_RID>` region, :ref:`Vector3<class_Vector3>` point **)** |const|
  964. 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.
  965. 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.
  966. \ **Note:** If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
  967. .. rst-class:: classref-item-separator
  968. ----
  969. .. _class_NavigationServer3D_method_region_set_enabled:
  970. .. rst-class:: classref-method
  971. void **region_set_enabled** **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)**
  972. If ``enabled`` is ``true``, the specified ``region`` will contribute to its current navigation map.
  973. .. rst-class:: classref-item-separator
  974. ----
  975. .. _class_NavigationServer3D_method_region_set_enter_cost:
  976. .. rst-class:: classref-method
  977. void **region_set_enter_cost** **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` enter_cost **)**
  978. Sets the ``enter_cost`` for this ``region``.
  979. .. rst-class:: classref-item-separator
  980. ----
  981. .. _class_NavigationServer3D_method_region_set_map:
  982. .. rst-class:: classref-method
  983. void **region_set_map** **(** :ref:`RID<class_RID>` region, :ref:`RID<class_RID>` map **)**
  984. Sets the map for the region.
  985. .. rst-class:: classref-item-separator
  986. ----
  987. .. _class_NavigationServer3D_method_region_set_navigation_layers:
  988. .. rst-class:: classref-method
  989. void **region_set_navigation_layers** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` navigation_layers **)**
  990. 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>`).
  991. .. rst-class:: classref-item-separator
  992. ----
  993. .. _class_NavigationServer3D_method_region_set_navigation_mesh:
  994. .. rst-class:: classref-method
  995. void **region_set_navigation_mesh** **(** :ref:`RID<class_RID>` region, :ref:`NavigationMesh<class_NavigationMesh>` navigation_mesh **)**
  996. Sets the navigation mesh for the region.
  997. .. rst-class:: classref-item-separator
  998. ----
  999. .. _class_NavigationServer3D_method_region_set_owner_id:
  1000. .. rst-class:: classref-method
  1001. void **region_set_owner_id** **(** :ref:`RID<class_RID>` region, :ref:`int<class_int>` owner_id **)**
  1002. Set the ``ObjectID`` of the object which manages this region.
  1003. .. rst-class:: classref-item-separator
  1004. ----
  1005. .. _class_NavigationServer3D_method_region_set_transform:
  1006. .. rst-class:: classref-method
  1007. void **region_set_transform** **(** :ref:`RID<class_RID>` region, :ref:`Transform3D<class_Transform3D>` transform **)**
  1008. Sets the global transformation for the region.
  1009. .. rst-class:: classref-item-separator
  1010. ----
  1011. .. _class_NavigationServer3D_method_region_set_travel_cost:
  1012. .. rst-class:: classref-method
  1013. void **region_set_travel_cost** **(** :ref:`RID<class_RID>` region, :ref:`float<class_float>` travel_cost **)**
  1014. Sets the ``travel_cost`` for this ``region``.
  1015. .. rst-class:: classref-item-separator
  1016. ----
  1017. .. _class_NavigationServer3D_method_region_set_use_edge_connections:
  1018. .. rst-class:: classref-method
  1019. void **region_set_use_edge_connections** **(** :ref:`RID<class_RID>` region, :ref:`bool<class_bool>` enabled **)**
  1020. 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.
  1021. .. rst-class:: classref-item-separator
  1022. ----
  1023. .. _class_NavigationServer3D_method_set_active:
  1024. .. rst-class:: classref-method
  1025. void **set_active** **(** :ref:`bool<class_bool>` active **)**
  1026. Control activation of this server.
  1027. .. rst-class:: classref-item-separator
  1028. ----
  1029. .. _class_NavigationServer3D_method_set_debug_enabled:
  1030. .. rst-class:: classref-method
  1031. void **set_debug_enabled** **(** :ref:`bool<class_bool>` enabled **)**
  1032. If ``true`` enables debug mode on the NavigationServer.
  1033. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1034. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1035. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1036. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1037. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1038. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1039. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`