diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-13 12:58:39 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-02-13 12:58:39 +0100 |
commit | 848c910227fa7be2da7285ea5162597bf13adc15 (patch) | |
tree | 5443e2ddd9ad5166d306a72c043f7e7de2ad8924 /doc/classes | |
parent | c144919a7415e6935f48b521f70d2a727d5a9606 (diff) | |
parent | f2c31965c04f17f05d534646ffb5056237a5cdde (diff) |
Merge pull request #73018 from smix8/fix_multilayered_tilemap_navigation_4.x
Fix navigation support for multilayered TileMaps
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/TileMap.xml | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 685aa16055..413cf62f7d 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -168,6 +168,15 @@ Returns the number of layers in the TileMap. </description> </method> + <method name="get_navigation_map" qualifiers="const"> + <return type="RID" /> + <param index="0" name="layer" type="int" /> + <description> + Returns the [NavigationServer2D] navigation map [RID] currently assigned to the specified TileMap [param layer]. + By default the TileMap uses the default [World2D] navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. + In order to make [NavigationAgent2D] switch between TileMap layer navigation maps use [method NavigationAgent2D.set_navigation_map] with the navigation map received from [method get_navigation_map]. + </description> + </method> <method name="get_neighbor_cell" qualifiers="const"> <return type="Vector2i" /> <param index="0" name="coords" type="Vector2i" /> @@ -366,6 +375,16 @@ If [code]layer[/code] is negative, the layers are accessed from the last one. </description> </method> + <method name="set_navigation_map"> + <return type="void" /> + <param index="0" name="layer" type="int" /> + <param index="1" name="map" type="RID" /> + <description> + Assigns a [NavigationServer2D] navigation map [RID] to the specified TileMap [param layer]. + By default the TileMap uses the default [World2D] navigation map for the first TileMap layer. For each additional TileMap layer a new navigation map is created for the additional layer. + In order to make [NavigationAgent2D] switch between TileMap layer navigation maps use [method NavigationAgent2D.set_navigation_map] with the navigation map received from [method get_navigation_map]. + </description> + </method> <method name="set_pattern"> <return type="void" /> <param index="0" name="layer" type="int" /> |