summaryrefslogtreecommitdiffstats
path: root/doc/classes
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2022-06-24 09:08:25 +0200
committerGitHub <noreply@github.com>2022-06-24 09:08:25 +0200
commit81afea620f7b11860b4622ee62b6470b1cd8f84a (patch)
treeed23c654f6bdd3dbb031835bcf138eb0fee9f1cc /doc/classes
parent913598fec166b4742c6242f46b8b51a4df30f6fb (diff)
parente57360d8df6329e1e547bc5717ee707a7620e039 (diff)
downloadredot-engine-81afea620f7b11860b4622ee62b6470b1cd8f84a.tar.gz
Merge pull request #62353 from smix8/navigation_region_owns_point_4.x
Add NavigationServer region_owns_point() helper function
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/NavigationServer2D.xml10
-rw-r--r--doc/classes/NavigationServer3D.xml10
2 files changed, 20 insertions, 0 deletions
diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml
index 187d916fba..a91ee45a1a 100644
--- a/doc/classes/NavigationServer2D.xml
+++ b/doc/classes/NavigationServer2D.xml
@@ -282,6 +282,16 @@
Returns the [code]travel_cost[/code] of this [code]region[/code].
</description>
</method>
+ <method name="region_owns_point" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="region" type="RID" />
+ <argument index="1" name="point" type="Vector2" />
+ <description>
+ Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
+ If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
+ [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">
<return type="void" />
<argument index="0" name="region" type="RID" />
diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml
index e605cf6645..97ff882645 100644
--- a/doc/classes/NavigationServer3D.xml
+++ b/doc/classes/NavigationServer3D.xml
@@ -332,6 +332,16 @@
Returns the [code]travel_cost[/code] of this [code]region[/code].
</description>
</method>
+ <method name="region_owns_point" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="region" type="RID" />
+ <argument index="1" name="point" type="Vector3" />
+ <description>
+ Returns [code]true[/code] if the provided [code]point[/code] in world space is currently owned by the provided navigation [code]region[/code]. Owned in this context means that one of the region's navigation mesh polygon faces has a possible position at the closest distance to this point compared to all other navigation meshes from other navigation regions that are also registered on the navigation map of the provided region.
+ If multiple navigation meshes have positions at equal distance the navigation region whose polygons are processed first wins the ownership. Polygons are processed in the same order that navigation regions were registered on the NavigationServer.
+ [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">
<return type="void" />
<argument index="0" name="region" type="RID" />