summaryrefslogtreecommitdiff
path: root/doc/classes/NavigationRegion3D.xml
diff options
context:
space:
mode:
authorsmix8 <52464204+smix8@users.noreply.github.com>2022-06-06 05:24:11 +0200
committersmix8 <52464204+smix8@users.noreply.github.com>2022-06-06 15:25:06 +0200
commitcfdfd304f1ad08b0498eda97b502aaccd95f559d (patch)
tree3cd40567408723ac84fa4fb4875591964705ea86 /doc/classes/NavigationRegion3D.xml
parent25908c17c9a8665f81e5f55e0853212036f05b77 (diff)
Add NavigationRegion costs for pathfinding
Add NavigationRegion costs for pathfinding.
Diffstat (limited to 'doc/classes/NavigationRegion3D.xml')
-rw-r--r--doc/classes/NavigationRegion3D.xml10
1 files changed, 10 insertions, 0 deletions
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">