class_navigationserver3d.rst 141 KB

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