diff options
author | smix8 <52464204+smix8@users.noreply.github.com> | 2022-06-19 13:23:13 +0200 |
---|---|---|
committer | smix8 <52464204+smix8@users.noreply.github.com> | 2022-06-19 13:47:19 +0200 |
commit | 55923ade68237ae6a344efe23c2656ed7ba976c2 (patch) | |
tree | 301c7a2e7db686fc0e5d0235436ea643f4959d82 /doc/classes | |
parent | 01efb938424c7678f5a834e25244d4ed741c563a (diff) |
Add navigation layer bitmask helper functions
Adds helper functions to work with the navigation layer bitmask.
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/NavigationAgent2D.xml | 15 | ||||
-rw-r--r-- | doc/classes/NavigationAgent3D.xml | 15 | ||||
-rw-r--r-- | doc/classes/NavigationRegion2D.xml | 15 | ||||
-rw-r--r-- | doc/classes/NavigationRegion3D.xml | 15 |
4 files changed, 60 insertions, 0 deletions
diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 0ac9513464..1cbb15a83b 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -34,6 +34,13 @@ Returns which index the agent is currently on in the navigation path's [PackedVector2Array]. </description> </method> + <method name="get_navigation_layer_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> + <description> + Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32. + </description> + </method> <method name="get_navigation_map" qualifiers="const"> <return type="RID" /> <description> @@ -76,6 +83,14 @@ Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. </description> </method> + <method name="set_navigation_layer_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> + <description> + Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32. + </description> + </method> <method name="set_navigation_map"> <return type="void" /> <argument index="0" name="navigation_map" type="RID" /> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index cc45a43ffc..895da73b29 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -34,6 +34,13 @@ Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. </description> </method> + <method name="get_navigation_layer_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> + <description> + Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32. + </description> + </method> <method name="get_navigation_map" qualifiers="const"> <return type="RID" /> <description> @@ -76,6 +83,14 @@ Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. </description> </method> + <method name="set_navigation_layer_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> + <description> + Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32. + </description> + </method> <method name="set_navigation_map"> <return type="void" /> <argument index="0" name="navigation_map" type="RID" /> diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml index 2647e961c9..c48ca18e9e 100644 --- a/doc/classes/NavigationRegion2D.xml +++ b/doc/classes/NavigationRegion2D.xml @@ -14,12 +14,27 @@ <tutorials> </tutorials> <methods> + <method name="get_navigation_layer_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> + <description> + Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32. + </description> + </method> <method name="get_region_rid" qualifiers="const"> <return type="RID" /> <description> Returns the [RID] of this region on the [NavigationServer2D]. Combined with [method NavigationServer2D.map_get_closest_point_owner] can be used to identify the [NavigationRegion2D] closest to a point on the merged navigation map. </description> </method> + <method name="set_navigation_layer_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> + <description> + Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32. + </description> + </method> </methods> <members> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 61dcd13dc8..9f4feee072 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -21,12 +21,27 @@ Bakes the [NavigationMesh]. If [code]on_thread[/code] 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 HTML5 with threads disabled). </description> </method> + <method name="get_navigation_layer_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> + <description> + Returns whether or not the specified layer of the [member navigation_layers] bitmask is enabled, given a [code]layer_number[/code] between 1 and 32. + </description> + </method> <method name="get_region_rid" qualifiers="const"> <return type="RID" /> <description> Returns the [RID] of this region on the [NavigationServer3D]. Combined with [method NavigationServer3D.map_get_closest_point_owner] can be used to identify the [NavigationRegion3D] closest to a point on the merged navigation map. </description> </method> + <method name="set_navigation_layer_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> + <description> + Based on [code]value[/code], enables or disables the specified layer in the [member navigation_layers] bitmask, given a [code]layer_number[/code] between 1 and 32. + </description> + </method> </methods> <members> <member name="enabled" type="bool" setter="set_enabled" getter="is_enabled" default="true"> |