class_navigationserver3d.rst 145 KB

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