Add navigation layer bitmask helper functions

Adds helper functions to work with the navigation layer bitmask.
This commit is contained in:
smix8
2022-06-19 13:23:13 +02:00
parent 01efb93842
commit 55923ade68
15 changed files with 198 additions and 3 deletions

View File

@@ -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" />