mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2025-12-31 09:49:22 +03:00
2412 lines
206 KiB
ReStructuredText
2412 lines
206 KiB
ReStructuredText
:github_url: hide
|
|
|
|
.. _class_NavigationServer3D:
|
|
|
|
NavigationServer3D
|
|
==================
|
|
|
|
**實驗性:** This class may be changed or removed in future versions.
|
|
|
|
**繼承:** :ref:`Object<class_Object>`
|
|
|
|
用於存取低階 3D 導覽的伺服器介面。
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
說明
|
|
----
|
|
|
|
NavigationServer3D is the server that handles navigation maps, regions and agents. It does not handle A\* navigation from :ref:`AStar3D<class_AStar3D>`.
|
|
|
|
Maps are divided into regions, which are composed of navigation meshes. Together, they define the navigable areas in the 3D world.
|
|
|
|
\ **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.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
\ **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.
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-introduction-group
|
|
|
|
教學
|
|
----
|
|
|
|
- :doc:`使用 NavigationServer <../tutorials/navigation/navigation_using_navigationservers>`
|
|
|
|
- `3D Navigation Demo <https://godotengine.org/asset-library/asset/2743>`__
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
方法
|
|
----
|
|
|
|
.. table::
|
|
:widths: auto
|
|
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`agent_create<class_NavigationServer3D_method_agent_create>`\ (\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`agent_get_avoidance_enabled<class_NavigationServer3D_method_agent_get_avoidance_enabled>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`agent_get_avoidance_layers<class_NavigationServer3D_method_agent_get_avoidance_layers>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`agent_get_avoidance_mask<class_NavigationServer3D_method_agent_get_avoidance_mask>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`agent_get_avoidance_priority<class_NavigationServer3D_method_agent_get_avoidance_priority>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`agent_get_height<class_NavigationServer3D_method_agent_get_height>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`agent_get_map<class_NavigationServer3D_method_agent_get_map>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`agent_get_max_neighbors<class_NavigationServer3D_method_agent_get_max_neighbors>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`agent_get_max_speed<class_NavigationServer3D_method_agent_get_max_speed>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`agent_get_neighbor_distance<class_NavigationServer3D_method_agent_get_neighbor_distance>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`agent_get_paused<class_NavigationServer3D_method_agent_get_paused>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`agent_get_position<class_NavigationServer3D_method_agent_get_position>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`agent_get_radius<class_NavigationServer3D_method_agent_get_radius>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`agent_get_time_horizon_agents<class_NavigationServer3D_method_agent_get_time_horizon_agents>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`agent_get_time_horizon_obstacles<class_NavigationServer3D_method_agent_get_time_horizon_obstacles>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`agent_get_use_3d_avoidance<class_NavigationServer3D_method_agent_get_use_3d_avoidance>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`agent_get_velocity<class_NavigationServer3D_method_agent_get_velocity>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`agent_has_avoidance_callback<class_NavigationServer3D_method_agent_has_avoidance_callback>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`agent_is_map_changed<class_NavigationServer3D_method_agent_is_map_changed>`\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_avoidance_callback<class_NavigationServer3D_method_agent_set_avoidance_callback>`\ (\ agent\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_avoidance_enabled<class_NavigationServer3D_method_agent_set_avoidance_enabled>`\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_avoidance_layers<class_NavigationServer3D_method_agent_set_avoidance_layers>`\ (\ agent\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_avoidance_mask<class_NavigationServer3D_method_agent_set_avoidance_mask>`\ (\ agent\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_avoidance_priority<class_NavigationServer3D_method_agent_set_avoidance_priority>`\ (\ agent\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_height<class_NavigationServer3D_method_agent_set_height>`\ (\ agent\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_map<class_NavigationServer3D_method_agent_set_map>`\ (\ agent\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_max_neighbors<class_NavigationServer3D_method_agent_set_max_neighbors>`\ (\ agent\: :ref:`RID<class_RID>`, count\: :ref:`int<class_int>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_max_speed<class_NavigationServer3D_method_agent_set_max_speed>`\ (\ agent\: :ref:`RID<class_RID>`, max_speed\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_neighbor_distance<class_NavigationServer3D_method_agent_set_neighbor_distance>`\ (\ agent\: :ref:`RID<class_RID>`, distance\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_paused<class_NavigationServer3D_method_agent_set_paused>`\ (\ agent\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_position<class_NavigationServer3D_method_agent_set_position>`\ (\ agent\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_radius<class_NavigationServer3D_method_agent_set_radius>`\ (\ agent\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_time_horizon_agents<class_NavigationServer3D_method_agent_set_time_horizon_agents>`\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_time_horizon_obstacles<class_NavigationServer3D_method_agent_set_time_horizon_obstacles>`\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_use_3d_avoidance<class_NavigationServer3D_method_agent_set_use_3d_avoidance>`\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_velocity<class_NavigationServer3D_method_agent_set_velocity>`\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`agent_set_velocity_forced<class_NavigationServer3D_method_agent_set_velocity_forced>`\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`bake_from_source_geometry_data<class_NavigationServer3D_method_bake_from_source_geometry_data>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`bake_from_source_geometry_data_async<class_NavigationServer3D_method_bake_from_source_geometry_data_async>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`free_rid<class_NavigationServer3D_method_free_rid>`\ (\ rid\: :ref:`RID<class_RID>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`get_debug_enabled<class_NavigationServer3D_method_get_debug_enabled>`\ (\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`get_maps<class_NavigationServer3D_method_get_maps>`\ (\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`get_process_info<class_NavigationServer3D_method_get_process_info>`\ (\ process_info\: :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_baking_navigation_mesh<class_NavigationServer3D_method_is_baking_navigation_mesh>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`link_create<class_NavigationServer3D_method_link_create>`\ (\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`link_get_enabled<class_NavigationServer3D_method_link_get_enabled>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`link_get_end_position<class_NavigationServer3D_method_link_get_end_position>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`link_get_enter_cost<class_NavigationServer3D_method_link_get_enter_cost>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`link_get_iteration_id<class_NavigationServer3D_method_link_get_iteration_id>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`link_get_map<class_NavigationServer3D_method_link_get_map>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`link_get_navigation_layers<class_NavigationServer3D_method_link_get_navigation_layers>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`link_get_owner_id<class_NavigationServer3D_method_link_get_owner_id>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`link_get_start_position<class_NavigationServer3D_method_link_get_start_position>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`link_get_travel_cost<class_NavigationServer3D_method_link_get_travel_cost>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`link_is_bidirectional<class_NavigationServer3D_method_link_is_bidirectional>`\ (\ link\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_bidirectional<class_NavigationServer3D_method_link_set_bidirectional>`\ (\ link\: :ref:`RID<class_RID>`, bidirectional\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_enabled<class_NavigationServer3D_method_link_set_enabled>`\ (\ link\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_end_position<class_NavigationServer3D_method_link_set_end_position>`\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_enter_cost<class_NavigationServer3D_method_link_set_enter_cost>`\ (\ link\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_map<class_NavigationServer3D_method_link_set_map>`\ (\ link\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_navigation_layers<class_NavigationServer3D_method_link_set_navigation_layers>`\ (\ link\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_owner_id<class_NavigationServer3D_method_link_set_owner_id>`\ (\ link\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_start_position<class_NavigationServer3D_method_link_set_start_position>`\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`link_set_travel_cost<class_NavigationServer3D_method_link_set_travel_cost>`\ (\ link\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`map_create<class_NavigationServer3D_method_map_create>`\ (\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_force_update<class_NavigationServer3D_method_map_force_update>`\ (\ map\: :ref:`RID<class_RID>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_agents<class_NavigationServer3D_method_map_get_agents>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`map_get_cell_height<class_NavigationServer3D_method_map_get_cell_height>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`map_get_cell_size<class_NavigationServer3D_method_map_get_cell_size>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point<class_NavigationServer3D_method_map_get_closest_point>`\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point_normal<class_NavigationServer3D_method_map_get_closest_point_normal>`\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`map_get_closest_point_owner<class_NavigationServer3D_method_map_get_closest_point_owner>`\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`map_get_closest_point_to_segment<class_NavigationServer3D_method_map_get_closest_point_to_segment>`\ (\ map\: :ref:`RID<class_RID>`, start\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, use_collision\: :ref:`bool<class_bool>` = false\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`map_get_edge_connection_margin<class_NavigationServer3D_method_map_get_edge_connection_margin>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`map_get_iteration_id<class_NavigationServer3D_method_map_get_iteration_id>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`map_get_link_connection_radius<class_NavigationServer3D_method_map_get_link_connection_radius>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_links<class_NavigationServer3D_method_map_get_links>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`map_get_merge_rasterizer_cell_scale<class_NavigationServer3D_method_map_get_merge_rasterizer_cell_scale>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_obstacles<class_NavigationServer3D_method_map_get_obstacles>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`map_get_path<class_NavigationServer3D_method_map_get_path>`\ (\ map\: :ref:`RID<class_RID>`, origin\: :ref:`Vector3<class_Vector3>`, destination\: :ref:`Vector3<class_Vector3>`, optimize\: :ref:`bool<class_bool>`, navigation_layers\: :ref:`int<class_int>` = 1\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`map_get_random_point<class_NavigationServer3D_method_map_get_random_point>`\ (\ map\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] | :ref:`map_get_regions<class_NavigationServer3D_method_map_get_regions>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`map_get_up<class_NavigationServer3D_method_map_get_up>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`map_get_use_async_iterations<class_NavigationServer3D_method_map_get_use_async_iterations>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`map_get_use_edge_connections<class_NavigationServer3D_method_map_get_use_edge_connections>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`map_is_active<class_NavigationServer3D_method_map_is_active>`\ (\ map\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_active<class_NavigationServer3D_method_map_set_active>`\ (\ map\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_cell_height<class_NavigationServer3D_method_map_set_cell_height>`\ (\ map\: :ref:`RID<class_RID>`, cell_height\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_cell_size<class_NavigationServer3D_method_map_set_cell_size>`\ (\ map\: :ref:`RID<class_RID>`, cell_size\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_edge_connection_margin<class_NavigationServer3D_method_map_set_edge_connection_margin>`\ (\ map\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_link_connection_radius<class_NavigationServer3D_method_map_set_link_connection_radius>`\ (\ map\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_merge_rasterizer_cell_scale<class_NavigationServer3D_method_map_set_merge_rasterizer_cell_scale>`\ (\ map\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_up<class_NavigationServer3D_method_map_set_up>`\ (\ map\: :ref:`RID<class_RID>`, up\: :ref:`Vector3<class_Vector3>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_use_async_iterations<class_NavigationServer3D_method_map_set_use_async_iterations>`\ (\ map\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`map_set_use_edge_connections<class_NavigationServer3D_method_map_set_use_edge_connections>`\ (\ map\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`obstacle_create<class_NavigationServer3D_method_obstacle_create>`\ (\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`obstacle_get_avoidance_enabled<class_NavigationServer3D_method_obstacle_get_avoidance_enabled>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`obstacle_get_avoidance_layers<class_NavigationServer3D_method_obstacle_get_avoidance_layers>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`obstacle_get_height<class_NavigationServer3D_method_obstacle_get_height>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`obstacle_get_map<class_NavigationServer3D_method_obstacle_get_map>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`obstacle_get_paused<class_NavigationServer3D_method_obstacle_get_paused>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`obstacle_get_position<class_NavigationServer3D_method_obstacle_get_position>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`obstacle_get_radius<class_NavigationServer3D_method_obstacle_get_radius>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`obstacle_get_use_3d_avoidance<class_NavigationServer3D_method_obstacle_get_use_3d_avoidance>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`obstacle_get_velocity<class_NavigationServer3D_method_obstacle_get_velocity>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`obstacle_get_vertices<class_NavigationServer3D_method_obstacle_get_vertices>`\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_avoidance_enabled<class_NavigationServer3D_method_obstacle_set_avoidance_enabled>`\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_avoidance_layers<class_NavigationServer3D_method_obstacle_set_avoidance_layers>`\ (\ obstacle\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_height<class_NavigationServer3D_method_obstacle_set_height>`\ (\ obstacle\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_map<class_NavigationServer3D_method_obstacle_set_map>`\ (\ obstacle\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_paused<class_NavigationServer3D_method_obstacle_set_paused>`\ (\ obstacle\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_position<class_NavigationServer3D_method_obstacle_set_position>`\ (\ obstacle\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_radius<class_NavigationServer3D_method_obstacle_set_radius>`\ (\ obstacle\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_use_3d_avoidance<class_NavigationServer3D_method_obstacle_set_use_3d_avoidance>`\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_velocity<class_NavigationServer3D_method_obstacle_set_velocity>`\ (\ obstacle\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`obstacle_set_vertices<class_NavigationServer3D_method_obstacle_set_vertices>`\ (\ obstacle\: :ref:`RID<class_RID>`, vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`parse_source_geometry_data<class_NavigationServer3D_method_parse_source_geometry_data>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, root_node\: :ref:`Node<class_Node>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`query_path<class_NavigationServer3D_method_query_path>`\ (\ parameters\: :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>`, result\: :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_bake_navigation_mesh<class_NavigationServer3D_method_region_bake_navigation_mesh>`\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, root_node\: :ref:`Node<class_Node>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`region_create<class_NavigationServer3D_method_region_create>`\ (\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`AABB<class_AABB>` | :ref:`region_get_bounds<class_NavigationServer3D_method_region_get_bounds>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`region_get_closest_point<class_NavigationServer3D_method_region_get_closest_point>`\ (\ region\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`region_get_closest_point_normal<class_NavigationServer3D_method_region_get_closest_point_normal>`\ (\ region\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`region_get_closest_point_to_segment<class_NavigationServer3D_method_region_get_closest_point_to_segment>`\ (\ region\: :ref:`RID<class_RID>`, start\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, use_collision\: :ref:`bool<class_bool>` = false\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`region_get_connection_pathway_end<class_NavigationServer3D_method_region_get_connection_pathway_end>`\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`region_get_connection_pathway_start<class_NavigationServer3D_method_region_get_connection_pathway_start>`\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`region_get_connections_count<class_NavigationServer3D_method_region_get_connections_count>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`region_get_enabled<class_NavigationServer3D_method_region_get_enabled>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`region_get_enter_cost<class_NavigationServer3D_method_region_get_enter_cost>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`region_get_iteration_id<class_NavigationServer3D_method_region_get_iteration_id>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`region_get_map<class_NavigationServer3D_method_region_get_map>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`region_get_navigation_layers<class_NavigationServer3D_method_region_get_navigation_layers>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`int<class_int>` | :ref:`region_get_owner_id<class_NavigationServer3D_method_region_get_owner_id>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Vector3<class_Vector3>` | :ref:`region_get_random_point<class_NavigationServer3D_method_region_get_random_point>`\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`Transform3D<class_Transform3D>` | :ref:`region_get_transform<class_NavigationServer3D_method_region_get_transform>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`float<class_float>` | :ref:`region_get_travel_cost<class_NavigationServer3D_method_region_get_travel_cost>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`region_get_use_async_iterations<class_NavigationServer3D_method_region_get_use_async_iterations>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`region_get_use_edge_connections<class_NavigationServer3D_method_region_get_use_edge_connections>`\ (\ region\: :ref:`RID<class_RID>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`region_owns_point<class_NavigationServer3D_method_region_owns_point>`\ (\ region\: :ref:`RID<class_RID>`, point\: :ref:`Vector3<class_Vector3>`\ ) |const| |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_enabled<class_NavigationServer3D_method_region_set_enabled>`\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_enter_cost<class_NavigationServer3D_method_region_set_enter_cost>`\ (\ region\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_map<class_NavigationServer3D_method_region_set_map>`\ (\ region\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_navigation_layers<class_NavigationServer3D_method_region_set_navigation_layers>`\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_navigation_mesh<class_NavigationServer3D_method_region_set_navigation_mesh>`\ (\ region\: :ref:`RID<class_RID>`, navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_owner_id<class_NavigationServer3D_method_region_set_owner_id>`\ (\ region\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_transform<class_NavigationServer3D_method_region_set_transform>`\ (\ region\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_travel_cost<class_NavigationServer3D_method_region_set_travel_cost>`\ (\ region\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_use_async_iterations<class_NavigationServer3D_method_region_set_use_async_iterations>`\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`region_set_use_edge_connections<class_NavigationServer3D_method_region_set_use_edge_connections>`\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_active<class_NavigationServer3D_method_set_active>`\ (\ active\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`set_debug_enabled<class_NavigationServer3D_method_set_debug_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`simplify_path<class_NavigationServer3D_method_simplify_path>`\ (\ path\: :ref:`PackedVector3Array<class_PackedVector3Array>`, epsilon\: :ref:`float<class_float>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`RID<class_RID>` | :ref:`source_geometry_parser_create<class_NavigationServer3D_method_source_geometry_parser_create>`\ (\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
| |void| | :ref:`source_geometry_parser_set_callback<class_NavigationServer3D_method_source_geometry_parser_set_callback>`\ (\ parser\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) |
|
|
+-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
訊號
|
|
----
|
|
|
|
.. _class_NavigationServer3D_signal_avoidance_debug_changed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**avoidance_debug_changed**\ (\ ) :ref:`🔗<class_NavigationServer3D_signal_avoidance_debug_changed>`
|
|
|
|
當避障除錯設定更改時發出。僅在除錯版本中可用。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_signal_map_changed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**map_changed**\ (\ map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_signal_map_changed>`
|
|
|
|
當導覽地圖更新時、地區移動或被修改時發出。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_signal_navigation_debug_changed:
|
|
|
|
.. rst-class:: classref-signal
|
|
|
|
**navigation_debug_changed**\ (\ ) :ref:`🔗<class_NavigationServer3D_signal_navigation_debug_changed>`
|
|
|
|
當導覽除錯設定更改時發出。僅在除錯版本中可用。
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
列舉
|
|
----
|
|
|
|
.. _enum_NavigationServer3D_ProcessInfo:
|
|
|
|
.. rst-class:: classref-enumeration
|
|
|
|
enum **ProcessInfo**: :ref:`🔗<enum_NavigationServer3D_ProcessInfo>`
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_ACTIVE_MAPS:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_ACTIVE_MAPS** = ``0``
|
|
|
|
常數,用於獲取活動導覽地圖的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_REGION_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_REGION_COUNT** = ``1``
|
|
|
|
常數,用於獲取活動導覽地區的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_AGENT_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_AGENT_COUNT** = ``2``
|
|
|
|
常數,用於獲取正在進行避障的活動導覽代理的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_LINK_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_LINK_COUNT** = ``3``
|
|
|
|
常數,用於獲取活動導覽連結的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_POLYGON_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_POLYGON_COUNT** = ``4``
|
|
|
|
常數,用於獲取導覽網格多邊形的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_EDGE_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_COUNT** = ``5``
|
|
|
|
常數,用於獲取導覽網格多邊形的邊的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_EDGE_MERGE_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_MERGE_COUNT** = ``6``
|
|
|
|
常數,用於獲取由於邊鍵重疊而被合併的導覽網格多邊形的邊的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_EDGE_CONNECTION_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_CONNECTION_COUNT** = ``7``
|
|
|
|
常數,用以獲取被認為由於邊接近而連接的導覽網格多邊形的邊的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_EDGE_FREE_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_EDGE_FREE_COUNT** = ``8``
|
|
|
|
常數,用於獲取無法合併但仍可通過邊接近或連結連接的導覽網格多邊形的邊的數量。
|
|
|
|
.. _class_NavigationServer3D_constant_INFO_OBSTACLE_COUNT:
|
|
|
|
.. rst-class:: classref-enumeration-constant
|
|
|
|
:ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>` **INFO_OBSTACLE_COUNT** = ``9``
|
|
|
|
Constant to get the number of active navigation obstacles.
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
----
|
|
|
|
.. rst-class:: classref-descriptions-group
|
|
|
|
方法說明
|
|
--------
|
|
|
|
.. _class_NavigationServer3D_method_agent_create:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **agent_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_agent_create>`
|
|
|
|
建立代理。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_avoidance_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **agent_get_avoidance_enabled**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_avoidance_enabled>`
|
|
|
|
如果指定代理 ``agent`` 啟用了避障,則返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_avoidance_layers:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **agent_get_avoidance_layers**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_avoidance_layers>`
|
|
|
|
Returns the ``avoidance_layers`` bitmask of the specified ``agent``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_avoidance_mask:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **agent_get_avoidance_mask**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_avoidance_mask>`
|
|
|
|
Returns the ``avoidance_mask`` bitmask of the specified ``agent``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_avoidance_priority:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **agent_get_avoidance_priority**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_avoidance_priority>`
|
|
|
|
Returns the ``avoidance_priority`` of the specified ``agent``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_height:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **agent_get_height**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_height>`
|
|
|
|
Returns the ``height`` of the specified ``agent``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_map:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **agent_get_map**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_map>`
|
|
|
|
返回請求 ``agent`` 目前分配到的導覽地圖 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_max_neighbors:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **agent_get_max_neighbors**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_max_neighbors>`
|
|
|
|
Returns the maximum number of other agents the specified ``agent`` takes into account in the navigation.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_max_speed:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **agent_get_max_speed**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_max_speed>`
|
|
|
|
Returns the maximum speed of the specified ``agent``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_neighbor_distance:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **agent_get_neighbor_distance**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_neighbor_distance>`
|
|
|
|
Returns the maximum distance to other agents the specified ``agent`` takes into account in the navigation.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_paused:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **agent_get_paused**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_paused>`
|
|
|
|
如果指定的 ``agent`` 處於暫停狀態,則返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **agent_get_position**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_position>`
|
|
|
|
Returns the position of the specified ``agent`` in world space.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_radius:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **agent_get_radius**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_radius>`
|
|
|
|
Returns the radius of the specified ``agent``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_time_horizon_agents:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **agent_get_time_horizon_agents**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_time_horizon_agents>`
|
|
|
|
Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to other agents.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_time_horizon_obstacles:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **agent_get_time_horizon_obstacles**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_time_horizon_obstacles>`
|
|
|
|
Returns the minimal amount of time for which the specified ``agent``'s velocities that are computed by the simulation are safe with respect to static avoidance obstacles.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_use_3d_avoidance:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **agent_get_use_3d_avoidance**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_use_3d_avoidance>`
|
|
|
|
如果指定代理 ``agent`` 使用 3D 空間 Vector3(x,y,z) 的避障而不是水平 2D Vector2(x,y) / Vector3(x,0.0,z) 避障,則返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_get_velocity:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **agent_get_velocity**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_get_velocity>`
|
|
|
|
Returns the velocity of the specified ``agent``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_has_avoidance_callback:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **agent_has_avoidance_callback**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_has_avoidance_callback>`
|
|
|
|
Return ``true`` if the specified ``agent`` has an avoidance callback.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_is_map_changed:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **agent_is_map_changed**\ (\ agent\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_agent_is_map_changed>`
|
|
|
|
Returns ``true`` if the map got changed the previous frame.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_avoidance_callback:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_avoidance_callback**\ (\ agent\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_callback>`
|
|
|
|
設定在 ``agent`` 的每個避障處理步驟之後呼叫的回呼函式 :ref:`Callable<class_Callable>`\ 。計算出的 ``safe_velocity`` 將在物理計算之前通過訊號發送。
|
|
|
|
\ **注意:**\ 只要代理還在導覽地圖上且未被釋放,建立的回呼函式就會始終獨立於 SceneTree 狀態進行處理。要為某個代理禁用回呼函式的發送,請再次使用一個空的 :ref:`Callable<class_Callable>` 來呼叫 :ref:`agent_set_avoidance_callback()<class_NavigationServer3D_method_agent_set_avoidance_callback>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_avoidance_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_avoidance_enabled**\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_enabled>`
|
|
|
|
如果 ``enabled`` 為 ``true``\ ,則指定的 ``agent`` 使用避障。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_avoidance_layers:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_avoidance_layers**\ (\ agent\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_layers>`
|
|
|
|
設定該代理的 ``avoidance_layers`` 位元遮罩。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_avoidance_mask:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_avoidance_mask**\ (\ agent\: :ref:`RID<class_RID>`, mask\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_mask>`
|
|
|
|
設定該代理的 ``avoidance_mask`` 位元遮罩。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_avoidance_priority:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_avoidance_priority**\ (\ agent\: :ref:`RID<class_RID>`, priority\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_avoidance_priority>`
|
|
|
|
Set the agent's ``avoidance_priority`` with a ``priority`` between 0.0 (lowest priority) to 1.0 (highest priority).
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_height:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_height**\ (\ agent\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_height>`
|
|
|
|
更新指定代理 ``agent`` 的高度 ``height``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_map:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_map**\ (\ agent\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_map>`
|
|
|
|
將代理放入地圖中。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_max_neighbors:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_max_neighbors**\ (\ agent\: :ref:`RID<class_RID>`, count\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_max_neighbors>`
|
|
|
|
設定在導覽中,該代理所考慮的其他代理的最大數量。這個數越大,模擬的執行時間越長。如果這個數太小,則模擬會不安全。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_max_speed:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_max_speed**\ (\ agent\: :ref:`RID<class_RID>`, max_speed\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_max_speed>`
|
|
|
|
設定該代理的最大速度。必須為正數。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_neighbor_distance:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_neighbor_distance**\ (\ agent\: :ref:`RID<class_RID>`, distance\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_neighbor_distance>`
|
|
|
|
設定在導覽中,該代理所考慮的其他代理的最大距離。這個數越大,模擬的執行時間越長。如果這個數太小,則模擬會不安全。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_paused:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_paused**\ (\ agent\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_paused>`
|
|
|
|
If ``paused`` is ``true`` the specified ``agent`` will not be processed. For example, it will not calculate avoidance velocities or receive avoidance callbacks.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_position**\ (\ agent\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_position>`
|
|
|
|
設定該代理在世界空間中的位置。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_radius:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_radius**\ (\ agent\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_radius>`
|
|
|
|
設定該代理的半徑。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_time_horizon_agents:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_time_horizon_agents**\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_time_horizon_agents>`
|
|
|
|
考慮其他代理的前提下,該代理的速度的最短安全時間,這個速度是通過模擬得到的。數值越大,代理回應其他代理的速度就越快,但該代理選擇速度的自由度也就越小。太高的取值會大大降低代理的移動速度。必須為正數。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_time_horizon_obstacles:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_time_horizon_obstacles**\ (\ agent\: :ref:`RID<class_RID>`, time_horizon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_time_horizon_obstacles>`
|
|
|
|
考慮其他靜態避障障礙物的前提下,該代理的速度的最短安全時間,這個速度是通過仿真得到的。數值越大,代理回應存在的靜態避障障礙物的速度就越快,但該代理選擇速度的自由度也就越小。太高的取值會大大降低代理的移動速度。必須為正數。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_use_3d_avoidance:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_use_3d_avoidance**\ (\ agent\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_use_3d_avoidance>`
|
|
|
|
Sets if the agent uses the 2D avoidance or the 3D avoidance while avoidance is enabled.
|
|
|
|
If ``true`` the agent calculates avoidance velocities in 3D for the xyz-axis, e.g. for games that take place in air, underwater or space. The 3D using agent only avoids other 3D avoidance using agent's. The 3D using agent only reacts to radius based avoidance obstacles. The 3D using agent ignores any vertices based obstacles. The 3D using agent only avoids other 3D using agent's.
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_velocity:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_velocity**\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_velocity>`
|
|
|
|
將 ``velocity`` 設定為指定代理 ``agent`` 的新的需求速度。避障模擬會盡可能嘗試滿足這個速度,但為了躲避與其他代理和障礙物的碰撞也會對它進行修改。將代理傳送至新的位置時,請使用 :ref:`agent_set_velocity_forced()<class_NavigationServer3D_method_agent_set_velocity_forced>` 重設內部模擬速度。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_agent_set_velocity_forced:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **agent_set_velocity_forced**\ (\ agent\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_agent_set_velocity_forced>`
|
|
|
|
將指定代理 ``agent`` 的避障模擬內部速度替換為 ``velocity``\ 。將代理傳送至新的位置時,應該在同一影格裡使用這個函式。頻繁呼叫這個函式可能讓代理卡住。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_bake_from_source_geometry_data:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **bake_from_source_geometry_data**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer3D_method_bake_from_source_geometry_data>`
|
|
|
|
使用 ``source_geometry_data`` 中提供的資料對 ``navigation_mesh`` 進行烘焙。烘焙過程結束後,會呼叫可選的 ``callback``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_bake_from_source_geometry_data_async:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **bake_from_source_geometry_data_async**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer3D_method_bake_from_source_geometry_data_async>`
|
|
|
|
使用 ``source_geometry_data`` 中提供的資料對 ``navigation_mesh`` 進行烘焙。烘焙過程結束後,會呼叫可選的 ``callback``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_free_rid:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **free_rid**\ (\ rid\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_free_rid>`
|
|
|
|
銷毀給定的 RID。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_get_debug_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **get_debug_enabled**\ (\ ) |const| :ref:`🔗<class_NavigationServer3D_method_get_debug_enabled>`
|
|
|
|
如果該 NavigationServer 啟用了除錯,則返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_get_maps:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **get_maps**\ (\ ) |const| :ref:`🔗<class_NavigationServer3D_method_get_maps>`
|
|
|
|
返回該 NavigationServer 上所有已建立的導覽地圖的 :ref:`RID<class_RID>`\ 。會同時返回已建立的 2D 和 3D 導覽地圖,因為理論上它們之間是沒有區別的。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_get_process_info:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **get_process_info**\ (\ process_info\: :ref:`ProcessInfo<enum_NavigationServer3D_ProcessInfo>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_get_process_info>`
|
|
|
|
Returns information about the current state of the NavigationServer.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_is_baking_navigation_mesh:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **is_baking_navigation_mesh**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_is_baking_navigation_mesh>`
|
|
|
|
Returns ``true`` when the provided navigation mesh is being baked on a background thread.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_create:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **link_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_link_create>`
|
|
|
|
在地圖上新建兩個地點之間的連結。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **link_get_enabled**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_enabled>`
|
|
|
|
如果指定的 ``link`` 處於暫停狀態,則返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_end_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **link_get_end_position**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_end_position>`
|
|
|
|
返回連結 ``link`` 的結束位置。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_enter_cost:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **link_get_enter_cost**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_enter_cost>`
|
|
|
|
返回 ``link`` 連結的進入消耗。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_iteration_id:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **link_get_iteration_id**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_iteration_id>`
|
|
|
|
Returns the current iteration ID of the navigation link. Every time the navigation link changes and synchronizes, the iteration ID increases. An iteration ID of ``0`` means the navigation link has never synchronized.
|
|
|
|
\ **Note:** The iteration ID will wrap around to ``1`` after reaching its range limit.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_map:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **link_get_map**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_map>`
|
|
|
|
返回請求的導覽連結 ``link`` 目前分配的導覽地圖的 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_navigation_layers:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **link_get_navigation_layers**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_navigation_layers>`
|
|
|
|
返回 ``link`` 的導覽層。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_owner_id:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **link_get_owner_id**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_owner_id>`
|
|
|
|
返回管理該連結的物件的 ``ObjectID``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_start_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **link_get_start_position**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_start_position>`
|
|
|
|
返回 ``link`` 連結的入口位置。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_get_travel_cost:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **link_get_travel_cost**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_get_travel_cost>`
|
|
|
|
返回 ``link`` 連結的移動消耗。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_is_bidirectional:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **link_is_bidirectional**\ (\ link\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_link_is_bidirectional>`
|
|
|
|
返回該 ``link`` 是否能夠雙向通行。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_bidirectional:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_bidirectional**\ (\ link\: :ref:`RID<class_RID>`, bidirectional\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_bidirectional>`
|
|
|
|
設定該 ``link`` 是否能夠雙向通行。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_enabled**\ (\ link\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_enabled>`
|
|
|
|
如果 ``enabled`` 為 ``true``\ ,則指定的 ``link`` 使用避障。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_end_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_end_position**\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_end_position>`
|
|
|
|
設定 ``link`` 的出口位置。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_enter_cost:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_enter_cost**\ (\ link\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_enter_cost>`
|
|
|
|
設定 ``link`` 的進入消耗 ``enter_cost``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_map:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_map**\ (\ link\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_map>`
|
|
|
|
設定該連結的導覽地圖 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_navigation_layers:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_navigation_layers**\ (\ link\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_navigation_layers>`
|
|
|
|
設定該連結的導覽層。這允許從路徑請求中選擇連結(當使用 :ref:`map_get_path()<class_NavigationServer3D_method_map_get_path>` 時)。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_owner_id:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_owner_id**\ (\ link\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_owner_id>`
|
|
|
|
設定管理該連結的物件的 ``ObjectID``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_start_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_start_position**\ (\ link\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_start_position>`
|
|
|
|
設定 ``link`` 的入口位置。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_link_set_travel_cost:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **link_set_travel_cost**\ (\ link\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_link_set_travel_cost>`
|
|
|
|
設定 ``link`` 的移動消耗 ``travel_cost``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_create:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **map_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_map_create>`
|
|
|
|
建立一張新地圖。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_force_update:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_force_update**\ (\ map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_force_update>`
|
|
|
|
**已棄用:** This method is no longer supported, as it is incompatible with asynchronous updates. It can only be used in a single-threaded context, at your own risk.
|
|
|
|
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).
|
|
|
|
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.
|
|
|
|
Avoidance processing and dispatch of the ``safe_velocity`` signals is unaffected by this function and continues to happen for all maps and agents at the end of the physics frame.
|
|
|
|
\ **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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_agents:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_agents**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_agents>`
|
|
|
|
返回所有與請求的導覽地圖 ``map`` 關聯的導覽代理的 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_cell_height:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **map_get_cell_height**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_cell_height>`
|
|
|
|
返回在 Y 軸上柵格化導覽網格頂點所使用的地圖儲存格高度。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_cell_size:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **map_get_cell_size**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_cell_size>`
|
|
|
|
返回在 XZ 平面上柵格化導覽網格頂點所使用的地圖儲存格大小。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_closest_point:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **map_get_closest_point**\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_closest_point>`
|
|
|
|
Returns the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``map``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_closest_point_normal:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **map_get_closest_point_normal**\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_closest_point_normal>`
|
|
|
|
Returns the navigation mesh surface normal closest to the provided ``to_point`` on the navigation ``map``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_closest_point_owner:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **map_get_closest_point_owner**\ (\ map\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_closest_point_owner>`
|
|
|
|
Returns the owner region RID for the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``map``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_closest_point_to_segment:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **map_get_closest_point_to_segment**\ (\ map\: :ref:`RID<class_RID>`, start\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, use_collision\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_closest_point_to_segment>`
|
|
|
|
Returns the navigation mesh surface point closest to the provided ``start`` and ``end`` segment on the navigation ``map``.
|
|
|
|
If ``use_collision`` is ``true``, a closest point test is only done when the segment intersects with the navigation mesh surface.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_edge_connection_margin:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **map_get_edge_connection_margin**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_edge_connection_margin>`
|
|
|
|
返回地圖的邊界連接邊距。這是讓兩個不同地區的邊界相連所需的最小頂點距離。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_iteration_id:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **map_get_iteration_id**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_iteration_id>`
|
|
|
|
Returns the current iteration id of the navigation map. Every time the navigation map changes and synchronizes the iteration id increases. An iteration id of 0 means the navigation map has never synchronized.
|
|
|
|
\ **Note:** The iteration id will wrap back to 1 after reaching its range limit.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_link_connection_radius:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **map_get_link_connection_radius**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_link_connection_radius>`
|
|
|
|
返回該地圖的連結連接半徑。該距離是任何連結將搜索要連接的導覽網格多邊形的最大範圍。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_links:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_links**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_links>`
|
|
|
|
返回目前分配給請求的導覽地圖 ``map`` 的所有導覽連結的 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_merge_rasterizer_cell_scale:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **map_get_merge_rasterizer_cell_scale**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_merge_rasterizer_cell_scale>`
|
|
|
|
Returns map's internal merge rasterizer cell scale.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_obstacles:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_obstacles**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_obstacles>`
|
|
|
|
返回目前分配給請求的導覽地圖 ``map`` 的所有導覽障礙物的 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_path:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`PackedVector3Array<class_PackedVector3Array>` **map_get_path**\ (\ map\: :ref:`RID<class_RID>`, origin\: :ref:`Vector3<class_Vector3>`, destination\: :ref:`Vector3<class_Vector3>`, optimize\: :ref:`bool<class_bool>`, navigation_layers\: :ref:`int<class_int>` = 1\ ) :ref:`🔗<class_NavigationServer3D_method_map_get_path>`
|
|
|
|
返回從原點到達目的地的導覽路徑。\ ``navigation_layers`` 是被允許在路徑中的所有區塊導覽層的位元遮罩。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_random_point:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **map_get_random_point**\ (\ map\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_random_point>`
|
|
|
|
Returns a random position picked from all map region polygons with matching ``navigation_layers``.
|
|
|
|
If ``uniformly`` is ``true``, all map regions, polygons, and faces are weighted by their surface area (slower).
|
|
|
|
If ``uniformly`` is ``false``, just a random region and a random polygon are picked (faster).
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_regions:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Array<class_Array>`\[:ref:`RID<class_RID>`\] **map_get_regions**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_regions>`
|
|
|
|
返回目前分配給所請求的導覽 ``map`` 的所有導覽區塊的 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_up:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **map_get_up**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_up>`
|
|
|
|
返回地圖的上方向。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_use_async_iterations:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **map_get_use_async_iterations**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_use_async_iterations>`
|
|
|
|
Returns ``true`` if the ``map`` synchronization uses an async process that runs on a background thread.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_get_use_edge_connections:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **map_get_use_edge_connections**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_get_use_edge_connections>`
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_is_active:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **map_is_active**\ (\ map\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_map_is_active>`
|
|
|
|
Returns ``true`` if the map is active.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_active:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_active**\ (\ map\: :ref:`RID<class_RID>`, active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_active>`
|
|
|
|
設定地圖的啟動態。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_cell_height:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_cell_height**\ (\ map\: :ref:`RID<class_RID>`, cell_height\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_cell_height>`
|
|
|
|
設定在 Y 軸上柵格化導覽網格頂點所使用的地圖儲存格高度。必須與所使用的導覽網格的儲存格高度相配對。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_cell_size:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_cell_size**\ (\ map\: :ref:`RID<class_RID>`, cell_size\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_cell_size>`
|
|
|
|
設定在 XZ 平面上柵格化導覽網格頂點所使用的地圖儲存格大小。必須與所使用的導覽網格的儲存格大小相配對。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_edge_connection_margin:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_edge_connection_margin**\ (\ map\: :ref:`RID<class_RID>`, margin\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_edge_connection_margin>`
|
|
|
|
設定用於焊接相容地區邊界的地圖邊界連接邊距。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_link_connection_radius:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_link_connection_radius**\ (\ map\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_link_connection_radius>`
|
|
|
|
設定該地圖用於連接連結和導覽多邊形的連結連接半徑。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_merge_rasterizer_cell_scale:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_merge_rasterizer_cell_scale**\ (\ map\: :ref:`RID<class_RID>`, scale\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_merge_rasterizer_cell_scale>`
|
|
|
|
Set the map's internal merge rasterizer cell scale used to control merging sensitivity.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_up:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_up**\ (\ map\: :ref:`RID<class_RID>`, up\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_up>`
|
|
|
|
設定地圖的上方向。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_use_async_iterations:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_use_async_iterations**\ (\ map\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_use_async_iterations>`
|
|
|
|
If ``enabled`` is ``true`` the ``map`` synchronization uses an async process that runs on a background thread.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_map_set_use_edge_connections:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **map_set_use_edge_connections**\ (\ map\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_map_set_use_edge_connections>`
|
|
|
|
設定導覽地圖 ``map`` 的邊緣連接使用情況。如果 ``enabled``\ ,則導覽地圖允許導覽區塊使用邊緣連接與位於導覽地圖邊緣連接邊距範圍內的其他導覽區塊相連接。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_create:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **obstacle_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_create>`
|
|
|
|
新建障礙物。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_avoidance_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **obstacle_get_avoidance_enabled**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_avoidance_enabled>`
|
|
|
|
如果給定的 ``obstacle`` 啟用了避障,則返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_avoidance_layers:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **obstacle_get_avoidance_layers**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_avoidance_layers>`
|
|
|
|
Returns the ``avoidance_layers`` bitmask of the specified ``obstacle``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_height:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **obstacle_get_height**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_height>`
|
|
|
|
Returns the ``height`` of the specified ``obstacle``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_map:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **obstacle_get_map**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_map>`
|
|
|
|
返回請求的障礙物 ``obstacle`` 目前分配的導覽地圖 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_paused:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **obstacle_get_paused**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_paused>`
|
|
|
|
如果指定的 ``obstacle`` 被暫停,則返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **obstacle_get_position**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_position>`
|
|
|
|
Returns the position of the specified ``obstacle`` in world space.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_radius:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **obstacle_get_radius**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_radius>`
|
|
|
|
Returns the radius of the specified dynamic ``obstacle``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_use_3d_avoidance:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **obstacle_get_use_3d_avoidance**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_use_3d_avoidance>`
|
|
|
|
如果提供的 ``obstacle`` 使用 3D 空間的 Vector3(x,y,z),不使用水平 2D Vector2(x,y) / Vector3(x,0.0,z),則返回 ``true``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_velocity:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **obstacle_get_velocity**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_velocity>`
|
|
|
|
Returns the velocity of the specified dynamic ``obstacle``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_get_vertices:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`PackedVector3Array<class_PackedVector3Array>` **obstacle_get_vertices**\ (\ obstacle\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_obstacle_get_vertices>`
|
|
|
|
Returns the outline vertices for the specified ``obstacle``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_avoidance_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_avoidance_enabled**\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_avoidance_enabled>`
|
|
|
|
如果 ``enabled``\ ,則提供的障礙物 ``obstacle`` 會影響代理的避障。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_avoidance_layers:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_avoidance_layers**\ (\ obstacle\: :ref:`RID<class_RID>`, layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_avoidance_layers>`
|
|
|
|
設定障礙物的避障層 ``avoidance_layers`` 位元遮罩。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_height:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_height**\ (\ obstacle\: :ref:`RID<class_RID>`, height\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_height>`
|
|
|
|
設定 ``obstacle`` 的高度 ``height``\ 。3D 代理會忽略位於其上方和下方的障礙物,使用 2D 避障。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_map:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_map**\ (\ obstacle\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_map>`
|
|
|
|
將 ``obstacle`` 分配給導覽地圖。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_paused:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_paused**\ (\ obstacle\: :ref:`RID<class_RID>`, paused\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_paused>`
|
|
|
|
If ``paused`` is ``true`` the specified ``obstacle`` will not be processed. For example, it will no longer affect avoidance velocities.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_position:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_position**\ (\ obstacle\: :ref:`RID<class_RID>`, position\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_position>`
|
|
|
|
為 ``obstacle`` 更新世界空間中的位置 ``position``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_radius:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_radius**\ (\ obstacle\: :ref:`RID<class_RID>`, radius\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_radius>`
|
|
|
|
設定動態障礙物的半徑。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_use_3d_avoidance:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_use_3d_avoidance**\ (\ obstacle\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_use_3d_avoidance>`
|
|
|
|
設定 ``obstacle`` 在啟用避障時使用 2D 避障還是 3D 避障。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_velocity:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_velocity**\ (\ obstacle\: :ref:`RID<class_RID>`, velocity\: :ref:`Vector3<class_Vector3>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_velocity>`
|
|
|
|
將動態障礙物 ``obstacle`` 的速度設定為 ``velocity``\ 。能夠讓其他代理更好地預測該動態障礙物的移動。僅在與障礙物半徑一同使用時有效。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_obstacle_set_vertices:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **obstacle_set_vertices**\ (\ obstacle\: :ref:`RID<class_RID>`, vertices\: :ref:`PackedVector3Array<class_PackedVector3Array>`\ ) :ref:`🔗<class_NavigationServer3D_method_obstacle_set_vertices>`
|
|
|
|
設定障礙物的輪廓頂點。如果頂點順時針纏繞,則障礙物會將代理向內部推擠,否則向外推擠。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_parse_source_geometry_data:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **parse_source_geometry_data**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, source_geometry_data\: :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>`, root_node\: :ref:`Node<class_Node>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer3D_method_parse_source_geometry_data>`
|
|
|
|
根據 ``navigation_mesh`` 的屬性解析 :ref:`SceneTree<class_SceneTree>` 中的源幾何體。會使用解析的結果對提供的 ``source_geometry_data`` 資源進行更新。後續可以在使用 :ref:`bake_from_source_geometry_data()<class_NavigationServer3D_method_bake_from_source_geometry_data>` 烘焙導覽網格時使用該資源。解析過程完成後,會呼叫可選的 ``callback``\ 。
|
|
|
|
\ **注意:**\ 因為 SceneTree 並不是執行緒安全的,所以這個函式需要在主執行緒執行或使用延遲呼叫。
|
|
|
|
\ **注意:**\ 從 :ref:`Mesh<class_Mesh>` 資源讀取資料陣列雖然很方便,但會對影格率造成負面影響。這些資料需要從 GPU 獲取,卡住正在處理的 :ref:`RenderingServer<class_RenderingServer>`\ 。出於性能考量,請優先使用碰撞形狀或在程式碼中建立完整的資料陣列等方法。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_query_path:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **query_path**\ (\ parameters\: :ref:`NavigationPathQueryParameters3D<class_NavigationPathQueryParameters3D>`, result\: :ref:`NavigationPathQueryResult3D<class_NavigationPathQueryResult3D>`, callback\: :ref:`Callable<class_Callable>` = Callable()\ ) :ref:`🔗<class_NavigationServer3D_method_query_path>`
|
|
|
|
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. After the process is finished the optional ``callback`` will be called.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_bake_navigation_mesh:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_bake_navigation_mesh**\ (\ navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`, root_node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_bake_navigation_mesh>`
|
|
|
|
**已棄用:** This method 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 :ref:`SceneTree<class_SceneTree>` for nodes that should contribute to the navigation mesh baking. The :ref:`SceneTree<class_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.
|
|
|
|
Bakes the ``navigation_mesh`` with bake source geometry collected starting from the ``root_node``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_create:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **region_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_region_create>`
|
|
|
|
建立一個新的地區。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_bounds:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`AABB<class_AABB>` **region_get_bounds**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_bounds>`
|
|
|
|
Returns the axis-aligned bounding box for the ``region``'s transformed navigation mesh.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_closest_point:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **region_get_closest_point**\ (\ region\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_closest_point>`
|
|
|
|
Returns the navigation mesh surface point closest to the provided ``to_point`` on the navigation ``region``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_closest_point_normal:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **region_get_closest_point_normal**\ (\ region\: :ref:`RID<class_RID>`, to_point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_closest_point_normal>`
|
|
|
|
Returns the navigation mesh surface normal closest to the provided ``to_point`` on the navigation ``region``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_closest_point_to_segment:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **region_get_closest_point_to_segment**\ (\ region\: :ref:`RID<class_RID>`, start\: :ref:`Vector3<class_Vector3>`, end\: :ref:`Vector3<class_Vector3>`, use_collision\: :ref:`bool<class_bool>` = false\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_closest_point_to_segment>`
|
|
|
|
Returns the navigation mesh surface point closest to the provided ``start`` and ``end`` segment on the navigation ``region``.
|
|
|
|
If ``use_collision`` is ``true``, a closest point test is only done when the segment intersects with the navigation mesh surface.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_connection_pathway_end:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **region_get_connection_pathway_end**\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_connection_pathway_end>`
|
|
|
|
返回連接門的終點。\ ``connection`` 是一個索引,介於 0 和 :ref:`region_get_connections_count()<class_NavigationServer3D_method_region_get_connections_count>` 的返回值之間。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_connection_pathway_start:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **region_get_connection_pathway_start**\ (\ region\: :ref:`RID<class_RID>`, connection\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_connection_pathway_start>`
|
|
|
|
返回連接門的起點。\ ``connection`` 是一個索引,介於 0 和 :ref:`region_get_connections_count()<class_NavigationServer3D_method_region_get_connections_count>` 的返回值之間。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_connections_count:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **region_get_connections_count**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_connections_count>`
|
|
|
|
返回 ``region`` 地區與其他地區在地圖上有多少連接。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **region_get_enabled**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_enabled>`
|
|
|
|
Returns ``true`` if the specified ``region`` is enabled.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_enter_cost:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **region_get_enter_cost**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_enter_cost>`
|
|
|
|
返回 ``region`` 地區的進入消耗。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_iteration_id:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **region_get_iteration_id**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_iteration_id>`
|
|
|
|
Returns the current iteration ID of the navigation region. Every time the navigation region changes and synchronizes, the iteration ID increases. An iteration ID of ``0`` means the navigation region has never synchronized.
|
|
|
|
\ **Note:** The iteration ID will wrap around to ``1`` after reaching its range limit.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_map:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **region_get_map**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_map>`
|
|
|
|
返回請求的 ``region`` 地區所關聯的導覽地圖的 :ref:`RID<class_RID>`\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_navigation_layers:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **region_get_navigation_layers**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_navigation_layers>`
|
|
|
|
返回該地區的導覽層。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_owner_id:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`int<class_int>` **region_get_owner_id**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_owner_id>`
|
|
|
|
返回管理該地區物件的 ``ObjectID``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_random_point:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Vector3<class_Vector3>` **region_get_random_point**\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`, uniformly\: :ref:`bool<class_bool>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_random_point>`
|
|
|
|
Returns a random position picked from all region polygons with matching ``navigation_layers``.
|
|
|
|
If ``uniformly`` is ``true``, all region polygons and faces are weighted by their surface area (slower).
|
|
|
|
If ``uniformly`` is ``false``, just a random polygon and face is picked (faster).
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_transform:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`Transform3D<class_Transform3D>` **region_get_transform**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_transform>`
|
|
|
|
Returns the global transformation of this ``region``.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_travel_cost:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`float<class_float>` **region_get_travel_cost**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_travel_cost>`
|
|
|
|
返回 ``region`` 地區的移動消耗。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_use_async_iterations:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **region_get_use_async_iterations**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_use_async_iterations>`
|
|
|
|
Returns ``true`` if the ``region`` uses an async synchronization process that runs on a background thread.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_get_use_edge_connections:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **region_get_use_edge_connections**\ (\ region\: :ref:`RID<class_RID>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_get_use_edge_connections>`
|
|
|
|
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.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_owns_point:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`bool<class_bool>` **region_owns_point**\ (\ region\: :ref:`RID<class_RID>`, point\: :ref:`Vector3<class_Vector3>`\ ) |const| :ref:`🔗<class_NavigationServer3D_method_region_owns_point>`
|
|
|
|
如果提供的世界空間中的 ``point`` 目前由提供的導覽區塊 ``region`` 擁有,則返回 ``true``\ 。在這裡的本文中,“擁有”意味著與來自其他導覽區塊的所有其他導覽網格相比,該區塊的導覽網格多邊形面中有一個距離該點最近的可能位置,這些其他導覽區塊也已在提供的區塊的導覽地圖上註冊。
|
|
|
|
如果有多個導覽網格存在符合條件的位置並且距離相等,那麼其多邊形先被處理的導覽區塊將贏得所有權。多邊形的處理順序與導覽區塊在 NavigationServer 上的註冊順序一致。
|
|
|
|
\ **注意:**\ 如果來自不同導覽區塊的導覽網格存在重疊(通常應當避免),可能會得到預料之外的結果。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_enabled**\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_enabled>`
|
|
|
|
If ``enabled`` is ``true``, the specified ``region`` will contribute to its current navigation map.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_enter_cost:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_enter_cost**\ (\ region\: :ref:`RID<class_RID>`, enter_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_enter_cost>`
|
|
|
|
設定 ``region`` 地區的進入消耗 ``enter_cost``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_map:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_map**\ (\ region\: :ref:`RID<class_RID>`, map\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_map>`
|
|
|
|
設定該地區的地圖。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_navigation_layers:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_navigation_layers**\ (\ region\: :ref:`RID<class_RID>`, navigation_layers\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_navigation_layers>`
|
|
|
|
設定地區的導覽層。能夠在路徑請求中選擇地區(使用 :ref:`map_get_path()<class_NavigationServer3D_method_map_get_path>`\ )。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_navigation_mesh:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_navigation_mesh**\ (\ region\: :ref:`RID<class_RID>`, navigation_mesh\: :ref:`NavigationMesh<class_NavigationMesh>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_navigation_mesh>`
|
|
|
|
設定該地圖的導覽網格。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_owner_id:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_owner_id**\ (\ region\: :ref:`RID<class_RID>`, owner_id\: :ref:`int<class_int>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_owner_id>`
|
|
|
|
設定管理該地區物件的 ``ObjectID``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_transform:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_transform**\ (\ region\: :ref:`RID<class_RID>`, transform\: :ref:`Transform3D<class_Transform3D>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_transform>`
|
|
|
|
設定該地區的全域變換。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_travel_cost:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_travel_cost**\ (\ region\: :ref:`RID<class_RID>`, travel_cost\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_travel_cost>`
|
|
|
|
設定 ``region`` 地區的移動消耗 ``travel_cost``\ 。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_use_async_iterations:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_use_async_iterations**\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_use_async_iterations>`
|
|
|
|
If ``enabled`` is ``true`` the ``region`` uses an async synchronization process that runs on a background thread.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_region_set_use_edge_connections:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **region_set_use_edge_connections**\ (\ region\: :ref:`RID<class_RID>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_region_set_use_edge_connections>`
|
|
|
|
如果 ``enabled``\ ,導覽區塊 ``region`` 將使用邊緣連接來與位於導覽地圖邊緣連接邊距範圍內的其他導覽區塊相連接。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_set_active:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_active**\ (\ active\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_set_active>`
|
|
|
|
控制這個伺服器是否啟動。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_set_debug_enabled:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **set_debug_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_NavigationServer3D_method_set_debug_enabled>`
|
|
|
|
如果為 ``true``\ ,則該 NavigationServer 啟用了除錯模式。
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_simplify_path:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`PackedVector3Array<class_PackedVector3Array>` **simplify_path**\ (\ path\: :ref:`PackedVector3Array<class_PackedVector3Array>`, epsilon\: :ref:`float<class_float>`\ ) :ref:`🔗<class_NavigationServer3D_method_simplify_path>`
|
|
|
|
Returns a simplified version of ``path`` with less critical path points removed. The simplification amount is in worlds units and controlled by ``epsilon``. The simplification uses a variant of Ramer-Douglas-Peucker algorithm for curve point decimation.
|
|
|
|
Path simplification can be helpful to mitigate various path following issues that can arise with certain agent types and script behaviors. E.g. "steering" agents or avoidance in "open fields".
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_source_geometry_parser_create:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
:ref:`RID<class_RID>` **source_geometry_parser_create**\ (\ ) :ref:`🔗<class_NavigationServer3D_method_source_geometry_parser_create>`
|
|
|
|
Creates a new source geometry parser. If a :ref:`Callable<class_Callable>` is set for the parser with :ref:`source_geometry_parser_set_callback()<class_NavigationServer3D_method_source_geometry_parser_set_callback>` the callback will be called for every single node that gets parsed whenever :ref:`parse_source_geometry_data()<class_NavigationServer3D_method_parse_source_geometry_data>` is used.
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
----
|
|
|
|
.. _class_NavigationServer3D_method_source_geometry_parser_set_callback:
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|void| **source_geometry_parser_set_callback**\ (\ parser\: :ref:`RID<class_RID>`, callback\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_NavigationServer3D_method_source_geometry_parser_set_callback>`
|
|
|
|
Sets the ``callback`` :ref:`Callable<class_Callable>` for the specific source geometry ``parser``. The :ref:`Callable<class_Callable>` will receive a call with the following parameters:
|
|
|
|
- ``navigation_mesh`` - The :ref:`NavigationMesh<class_NavigationMesh>` reference used to define the parse settings. Do NOT edit or add directly to the navigation mesh.
|
|
|
|
- ``source_geometry_data`` - The :ref:`NavigationMeshSourceGeometryData3D<class_NavigationMeshSourceGeometryData3D>` reference. Add custom source geometry for navigation mesh baking to this object.
|
|
|
|
- ``node`` - The :ref:`Node<class_Node>` that is parsed.
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (本方法通常需要使用者覆寫才能生效。)`
|
|
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
|
.. |const| replace:: :abbr:`const (本方法沒有副作用。不會修改該實例的任何成員變數。)`
|
|
.. |vararg| replace:: :abbr:`vararg (本方法除了這裡描述的參數外,還可以接受任意數量的參數。)`
|
|
.. |constructor| replace:: :abbr:`constructor (本方法用於建構一個型別。)`
|
|
.. |static| replace:: :abbr:`static (本方法無需實例即可呼叫,因此可以直接使用類別名稱呼叫。)`
|
|
.. |operator| replace:: :abbr:`operator (本方法描述將本型別作為左運算元時可用的有效運算子。)`
|
|
.. |bitfield| replace:: :abbr:`BitField (此值是由下列旗標組成的位元遮罩整數。)`
|
|
.. |void| replace:: :abbr:`void (無回傳值。)`
|