Add functions to get axis-aligned bounds of navigation regions

Adds functions to get the navigation mesh Rect2 of a NavigationRegion2D or AABB of a NavigationRegion3D.
This commit is contained in:
smix8
2025-01-11 02:16:53 +01:00
parent d79ff848fa
commit a7520fca6a
18 changed files with 119 additions and 0 deletions

View File

@ -23,6 +23,12 @@
Bakes the [NavigationMesh]. If [param on_thread] is set to [code]true[/code] (default), the baking is done on a separate thread. Baking on separate thread is useful because navigation baking is not a cheap operation. When it is completed, it automatically sets the new [NavigationMesh]. Please note that baking on separate thread may be very slow if geometry is parsed from meshes as async access to each mesh involves heavy synchronization. Also, please note that baking on a separate thread is automatically disabled on operating systems that cannot use threads (such as Web with threads disabled).
</description>
</method>
<method name="get_bounds" qualifiers="const">
<return type="AABB" />
<description>
Returns the axis-aligned bounding box for the region's transformed navigation mesh.
</description>
</method>
<method name="get_navigation_layer_value" qualifiers="const">
<return type="bool" />
<param index="0" name="layer_number" type="int" />