summaryrefslogtreecommitdiff
path: root/doc/classes/NavigationServer2D.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/NavigationServer2D.xml')
-rw-r--r--doc/classes/NavigationServer2D.xml106
1 files changed, 55 insertions, 51 deletions
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 230e58a12a..7270a19b4d 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<class name="NavigationServer2D" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+<class name="NavigationServer2D" inherits="Object" is_experimental="true" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
<brief_description>
Server interface for low-level 2D navigation access
</brief_description>
@@ -15,9 +15,10 @@
</description>
<tutorials>
<link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link>
+ <link title="Using NavigationServer">$DOCS_URL/tutorials/navigation/navigation_using_navigationservers.html</link>
</tutorials>
<methods>
- <method name="agent_create" qualifiers="const">
+ <method name="agent_create">
<return type="RID" />
<description>
Creates the agent.
@@ -37,18 +38,16 @@
Returns true if the map got changed the previous frame.
</description>
</method>
- <method name="agent_set_callback" qualifiers="const">
+ <method name="agent_set_callback">
<return type="void" />
<param index="0" name="agent" type="RID" />
- <param index="1" name="object_id" type="int" />
- <param index="2" name="method" type="StringName" />
- <param index="3" name="userdata" type="Variant" default="null" />
+ <param index="1" name="callback" type="Callable" />
<description>
- Sets the callback [param object_id] and [param method] that gets called after each avoidance processing step for the [param agent]. The calculated [code]safe_velocity[/code] will be dispatched with a signal to the object just before the physics calculations.
- [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]0[/code] ObjectID as the [param object_id].
+ Sets the callback that gets called after each avoidance processing step for the [param agent]. The calculated [code]safe_velocity[/code] will be passed as the first parameter just before the physics calculations.
+ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with an empty [Callable].
</description>
</method>
- <method name="agent_set_map" qualifiers="const">
+ <method name="agent_set_map">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="map" type="RID" />
@@ -56,7 +55,7 @@
Puts the agent in the map.
</description>
</method>
- <method name="agent_set_max_neighbors" qualifiers="const">
+ <method name="agent_set_max_neighbors">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="count" type="int" />
@@ -64,7 +63,7 @@
Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
</description>
</method>
- <method name="agent_set_max_speed" qualifiers="const">
+ <method name="agent_set_max_speed">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="max_speed" type="float" />
@@ -72,7 +71,7 @@
Sets the maximum speed of the agent. Must be positive.
</description>
</method>
- <method name="agent_set_neighbor_distance" qualifiers="const">
+ <method name="agent_set_neighbor_distance">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="distance" type="float" />
@@ -80,7 +79,7 @@
Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe.
</description>
</method>
- <method name="agent_set_position" qualifiers="const">
+ <method name="agent_set_position">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="position" type="Vector2" />
@@ -88,7 +87,7 @@
Sets the position of the agent in world space.
</description>
</method>
- <method name="agent_set_radius" qualifiers="const">
+ <method name="agent_set_radius">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="radius" type="float" />
@@ -96,7 +95,7 @@
Sets the radius of the agent.
</description>
</method>
- <method name="agent_set_target_velocity" qualifiers="const">
+ <method name="agent_set_target_velocity">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="target_velocity" type="Vector2" />
@@ -104,7 +103,7 @@
Sets the new target velocity.
</description>
</method>
- <method name="agent_set_time_horizon" qualifiers="const">
+ <method name="agent_set_time_horizon">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="time" type="float" />
@@ -112,7 +111,7 @@
The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive.
</description>
</method>
- <method name="agent_set_velocity" qualifiers="const">
+ <method name="agent_set_velocity">
<return type="void" />
<param index="0" name="agent" type="RID" />
<param index="1" name="velocity" type="Vector2" />
@@ -120,7 +119,7 @@
Sets the current velocity of the agent.
</description>
</method>
- <method name="free_rid" qualifiers="const">
+ <method name="free_rid">
<return type="void" />
<param index="0" name="rid" type="RID" />
<description>
@@ -133,17 +132,17 @@
Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them.
</description>
</method>
- <method name="link_create" qualifiers="const">
+ <method name="link_create">
<return type="RID" />
<description>
- Create a new link between two locations on a map.
+ Create a new link between two positions on a map.
</description>
</method>
- <method name="link_get_end_location" qualifiers="const">
+ <method name="link_get_end_position" qualifiers="const">
<return type="Vector2" />
<param index="0" name="link" type="RID" />
<description>
- Returns the ending location of this [code]link[/code].
+ Returns the ending position of this [code]link[/code].
</description>
</method>
<method name="link_get_enter_cost" qualifiers="const">
@@ -174,11 +173,11 @@
Returns the [code]ObjectID[/code] of the object which manages this link.
</description>
</method>
- <method name="link_get_start_location" qualifiers="const">
+ <method name="link_get_start_position" qualifiers="const">
<return type="Vector2" />
<param index="0" name="link" type="RID" />
<description>
- Returns the starting location of this [code]link[/code].
+ Returns the starting position of this [code]link[/code].
</description>
</method>
<method name="link_get_travel_cost" qualifiers="const">
@@ -195,7 +194,7 @@
Returns whether this [code]link[/code] can be travelled in both directions.
</description>
</method>
- <method name="link_set_bidirectional" qualifiers="const">
+ <method name="link_set_bidirectional">
<return type="void" />
<param index="0" name="link" type="RID" />
<param index="1" name="bidirectional" type="bool" />
@@ -203,15 +202,15 @@
Sets whether this [code]link[/code] can be travelled in both directions.
</description>
</method>
- <method name="link_set_end_location" qualifiers="const">
+ <method name="link_set_end_position">
<return type="void" />
<param index="0" name="link" type="RID" />
- <param index="1" name="location" type="Vector2" />
+ <param index="1" name="position" type="Vector2" />
<description>
- Sets the exit location for the [code]link[/code].
+ Sets the exit position for the [code]link[/code].
</description>
</method>
- <method name="link_set_enter_cost" qualifiers="const">
+ <method name="link_set_enter_cost">
<return type="void" />
<param index="0" name="link" type="RID" />
<param index="1" name="enter_cost" type="float" />
@@ -219,7 +218,7 @@
Sets the [code]enter_cost[/code] for this [code]link[/code].
</description>
</method>
- <method name="link_set_map" qualifiers="const">
+ <method name="link_set_map">
<return type="void" />
<param index="0" name="link" type="RID" />
<param index="1" name="map" type="RID" />
@@ -227,7 +226,7 @@
Sets the navigation map [RID] for the link.
</description>
</method>
- <method name="link_set_navigation_layers" qualifiers="const">
+ <method name="link_set_navigation_layers">
<return type="void" />
<param index="0" name="link" type="RID" />
<param index="1" name="navigation_layers" type="int" />
@@ -235,7 +234,7 @@
Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer2D.map_get_path]).
</description>
</method>
- <method name="link_set_owner_id" qualifiers="const">
+ <method name="link_set_owner_id">
<return type="void" />
<param index="0" name="link" type="RID" />
<param index="1" name="owner_id" type="int" />
@@ -243,15 +242,15 @@
Set the [code]ObjectID[/code] of the object which manages this link.
</description>
</method>
- <method name="link_set_start_location" qualifiers="const">
+ <method name="link_set_start_position">
<return type="void" />
<param index="0" name="link" type="RID" />
- <param index="1" name="location" type="Vector2" />
+ <param index="1" name="position" type="Vector2" />
<description>
- Sets the entry location for this [code]link[/code].
+ Sets the entry position for this [code]link[/code].
</description>
</method>
- <method name="link_set_travel_cost" qualifiers="const">
+ <method name="link_set_travel_cost">
<return type="void" />
<param index="0" name="link" type="RID" />
<param index="1" name="travel_cost" type="float" />
@@ -259,7 +258,7 @@
Sets the [code]travel_cost[/code] for this [code]link[/code].
</description>
</method>
- <method name="map_create" qualifiers="const">
+ <method name="map_create">
<return type="RID" />
<description>
Create a new map.
@@ -351,7 +350,7 @@
Returns true if the map is active.
</description>
</method>
- <method name="map_set_active" qualifiers="const">
+ <method name="map_set_active">
<return type="void" />
<param index="0" name="map" type="RID" />
<param index="1" name="active" type="bool" />
@@ -359,7 +358,7 @@
Sets the map active.
</description>
</method>
- <method name="map_set_cell_size" qualifiers="const">
+ <method name="map_set_cell_size">
<return type="void" />
<param index="0" name="map" type="RID" />
<param index="1" name="cell_size" type="float" />
@@ -367,7 +366,7 @@
Set the map cell size used to weld the navigation mesh polygons.
</description>
</method>
- <method name="map_set_edge_connection_margin" qualifiers="const">
+ <method name="map_set_edge_connection_margin">
<return type="void" />
<param index="0" name="map" type="RID" />
<param index="1" name="margin" type="float" />
@@ -375,7 +374,7 @@
Set the map edge connection margin used to weld the compatible region edges.
</description>
</method>
- <method name="map_set_link_connection_radius" qualifiers="const">
+ <method name="map_set_link_connection_radius">
<return type="void" />
<param index="0" name="map" type="RID" />
<param index="1" name="radius" type="float" />
@@ -391,7 +390,7 @@
Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters2D]. Updates the provided [NavigationPathQueryResult2D] result object with the path among other results requested by the query.
</description>
</method>
- <method name="region_create" qualifiers="const">
+ <method name="region_create">
<return type="RID" />
<description>
Creates a new region.
@@ -465,7 +464,7 @@
[b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected.
</description>
</method>
- <method name="region_set_enter_cost" qualifiers="const">
+ <method name="region_set_enter_cost">
<return type="void" />
<param index="0" name="region" type="RID" />
<param index="1" name="enter_cost" type="float" />
@@ -473,7 +472,7 @@
Sets the [param enter_cost] for this [param region].
</description>
</method>
- <method name="region_set_map" qualifiers="const">
+ <method name="region_set_map">
<return type="void" />
<param index="0" name="region" type="RID" />
<param index="1" name="map" type="RID" />
@@ -481,7 +480,7 @@
Sets the map for the region.
</description>
</method>
- <method name="region_set_navigation_layers" qualifiers="const">
+ <method name="region_set_navigation_layers">
<return type="void" />
<param index="0" name="region" type="RID" />
<param index="1" name="navigation_layers" type="int" />
@@ -489,15 +488,15 @@
Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]).
</description>
</method>
- <method name="region_set_navpoly" qualifiers="const">
+ <method name="region_set_navigation_polygon">
<return type="void" />
<param index="0" name="region" type="RID" />
- <param index="1" name="nav_poly" type="NavigationPolygon" />
+ <param index="1" name="navigation_polygon" type="NavigationPolygon" />
<description>
- Sets the navigation mesh for the region.
+ Sets the [param navigation_polygon] for the region.
</description>
</method>
- <method name="region_set_owner_id" qualifiers="const">
+ <method name="region_set_owner_id">
<return type="void" />
<param index="0" name="region" type="RID" />
<param index="1" name="owner_id" type="int" />
@@ -505,7 +504,7 @@
Set the [code]ObjectID[/code] of the object which manages this region.
</description>
</method>
- <method name="region_set_transform" qualifiers="const">
+ <method name="region_set_transform">
<return type="void" />
<param index="0" name="region" type="RID" />
<param index="1" name="transform" type="Transform2D" />
@@ -513,7 +512,7 @@
Sets the global transformation for the region.
</description>
</method>
- <method name="region_set_travel_cost" qualifiers="const">
+ <method name="region_set_travel_cost">
<return type="void" />
<param index="0" name="region" type="RID" />
<param index="1" name="travel_cost" type="float" />
@@ -529,5 +528,10 @@
Emitted when a navigation map is updated, when a region moves or is modified.
</description>
</signal>
+ <signal name="navigation_debug_changed">
+ <description>
+ Emitted when navigation debug settings are changed. Only available in debug builds.
+ </description>
+ </signal>
</signals>
</class>