diff options
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/NavigationAgent2D.xml | 5 | ||||
-rw-r--r-- | doc/classes/NavigationAgent3D.xml | 5 | ||||
-rw-r--r-- | doc/classes/NavigationRegion2D.xml | 9 | ||||
-rw-r--r-- | doc/classes/NavigationRegion3D.xml | 10 | ||||
-rw-r--r-- | doc/classes/NavigationServer2D.xml | 30 | ||||
-rw-r--r-- | doc/classes/NavigationServer3D.xml | 30 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 4 |
7 files changed, 87 insertions, 6 deletions
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 942579f564..945947ad9f 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -5,6 +5,7 @@ </brief_description> <description> 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent2D] is physics safe. + [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. </description> <tutorials> </tutorials> @@ -24,7 +25,7 @@ <method name="get_nav_path" qualifiers="const"> <return type="PackedVector2Array" /> <description> - Returns the path from start to finish in global coordinates. + Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. </description> </method> <method name="get_nav_path_index" qualifiers="const"> @@ -36,7 +37,7 @@ <method name="get_next_location"> <return type="Vector2" /> <description> - Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. + Returns the next location in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. </description> </method> <method name="get_rid" qualifiers="const"> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index db2210b6e3..7f7e058742 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -5,6 +5,7 @@ </brief_description> <description> 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent3D] is physics safe. + [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. </description> <tutorials> </tutorials> @@ -24,7 +25,7 @@ <method name="get_nav_path" qualifiers="const"> <return type="PackedVector3Array" /> <description> - Returns the path from start to finish in global coordinates. + Returns this agent's current path from start to finish in global coordinates. The path only updates when the target location is changed or the agent requires a repath. The path array is not intended to be used in direct path movement as the agent has its own internal path logic that would get corrupted by changing the path array manually. Use the intended [method get_next_location] once every physics frame to receive the next path point for the agents movement as this function also updates the internal path logic. </description> </method> <method name="get_nav_path_index" qualifiers="const"> @@ -36,7 +37,7 @@ <method name="get_next_location"> <return type="Vector3" /> <description> - Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. + Returns the next location in global coordinates that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. The use of this function once every physics frame is required to update the internal path logic of the NavigationAgent. </description> </method> <method name="get_rid" qualifiers="const"> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index 5cd2e035b6..542aa8f619 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -7,6 +7,9 @@ A region of the navigation map. It tells the [NavigationServer2D] what can be navigated and what cannot, based on its [NavigationPolygon] resource. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer2D.map_set_edge_connection_margin]. [b]Note:[/b] Overlapping two regions' polygons is not enough for connecting two regions. They must share a similar edge. + The pathfinding cost of entering this region from another region can be controlled with the [member enter_cost] value. + [b]Note[/b]: This value is not added to the path cost when the start position is already inside this region. + The pathfinding cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier. </description> <tutorials> </tutorials> @@ -22,11 +25,17 @@ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> Determines if the [NavigationRegion2D] is enabled or disabled. </member> + <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0"> + When pathfinding enters this regions navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. + </member> <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1"> A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path]. </member> <member name="navpoly" type="NavigationPolygon" setter="set_navigation_polygon" getter="get_navigation_polygon"> The [NavigationPolygon] resource to use. </member> + <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0"> + When pathfinding moves inside this regions navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path. + </member> </members> </class> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 42f0e0c5d9..e45bca7f8b 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -6,6 +6,10 @@ <description> A region of the navigation map. It tells the [NavigationServer3D] what can be navigated and what cannot, based on its [NavigationMesh] resource. Two regions can be connected to each other if they share a similar edge. You can set the minimum distance between two vertices required to connect two edges by using [method NavigationServer3D.map_set_edge_connection_margin]. + [b]Note:[/b] Overlapping two regions' navmeshes is not enough for connecting two regions. They must share a similar edge. + The cost of entering this region from another region can be controlled with the [member enter_cost] value. + [b]Note[/b]: This value is not added to the path cost when the start position is already inside this region. + The cost of traveling distances inside this region can be controlled with the [member travel_cost] multiplier. </description> <tutorials> </tutorials> @@ -28,12 +32,18 @@ <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> Determines if the [NavigationRegion3D] is enabled or disabled. </member> + <member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0"> + When pathfinding enters this regions navmesh from another regions navmesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path. + </member> <member name="layers" type="int" setter="set_layers" getter="get_layers" default="1"> A bitfield determining all layers the region belongs to. These layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path]. </member> <member name="navmesh" type="NavigationMesh" setter="set_navigation_mesh" getter="get_navigation_mesh"> The [NavigationMesh] resource to use. </member> + <member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0"> + When pathfinding moves inside this regions navmesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path. + </member> </members> <signals> <signal name="bake_finished"> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 1994a7a4c4..7b0dac99c3 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -247,6 +247,13 @@ Returns how many connections this [code]region[/code] has with other regions in the map. </description> </method> + <method name="region_get_enter_cost" qualifiers="const"> + <return type="float" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the [code]enter_cost[/code] of this [code]region[/code]. + </description> + </method> <method name="region_get_layers" qualifiers="const"> <return type="int" /> <argument index="0" name="region" type="RID" /> @@ -261,6 +268,21 @@ Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. </description> </method> + <method name="region_get_travel_cost" qualifiers="const"> + <return type="float" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the [code]travel_cost[/code] of this [code]region[/code]. + </description> + </method> + <method name="region_set_enter_cost" qualifiers="const"> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="enter_cost" type="float" /> + <description> + Sets the [code]enter_cost[/code] for this [code]region[/code]. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> @@ -293,6 +315,14 @@ Sets the global transformation for the region. </description> </method> + <method name="region_set_travel_cost" qualifiers="const"> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="travel_cost" type="float" /> + <description> + Sets the [code]travel_cost[/code] for this [code]region[/code]. + </description> + </method> </methods> <signals> <signal name="map_changed"> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index 2a729e7108..d6574dd69a 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -297,6 +297,13 @@ Returns how many connections this [code]region[/code] has with other regions in the map. </description> </method> + <method name="region_get_enter_cost" qualifiers="const"> + <return type="float" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the [code]enter_cost[/code] of this [code]region[/code]. + </description> + </method> <method name="region_get_layers" qualifiers="const"> <return type="int" /> <argument index="0" name="region" type="RID" /> @@ -311,6 +318,21 @@ Returns the navigation map [RID] the requested [code]region[/code] is currently assigned to. </description> </method> + <method name="region_get_travel_cost" qualifiers="const"> + <return type="float" /> + <argument index="0" name="region" type="RID" /> + <description> + Returns the [code]travel_cost[/code] of this [code]region[/code]. + </description> + </method> + <method name="region_set_enter_cost" qualifiers="const"> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="enter_cost" type="float" /> + <description> + Sets the [code]enter_cost[/code] for this [code]region[/code]. + </description> + </method> <method name="region_set_layers" qualifiers="const"> <return type="void" /> <argument index="0" name="region" type="RID" /> @@ -343,6 +365,14 @@ Sets the global transformation for the region. </description> </method> + <method name="region_set_travel_cost" qualifiers="const"> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="travel_cost" type="float" /> + <description> + Sets the [code]travel_cost[/code] for this [code]region[/code]. + </description> + </method> <method name="set_active" qualifiers="const"> <return type="void" /> <argument index="0" name="active" type="bool" /> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index a5ac8f3601..8a3677c0b4 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1384,10 +1384,10 @@ <member name="navigation/2d/default_edge_connection_margin" type="int" setter="" getter="" default="1"> Default edge connection margin for 2D navigation maps. See [method NavigationServer2D.map_set_edge_connection_margin]. </member> - <member name="navigation/3d/default_cell_size" type="float" setter="" getter="" default="0.3"> + <member name="navigation/3d/default_cell_size" type="float" setter="" getter="" default="0.25"> Default cell size for 3D navigation maps. See [method NavigationServer3D.map_set_cell_size]. </member> - <member name="navigation/3d/default_edge_connection_margin" type="float" setter="" getter="" default="0.3"> + <member name="navigation/3d/default_edge_connection_margin" type="float" setter="" getter="" default="0.25"> Default edge connection margin for 3D navigation maps. See [method NavigationServer3D.map_set_edge_connection_margin]. </member> <member name="network/limits/debugger/max_chars_per_second" type="int" setter="" getter="" default="32768"> |