diff options
author | smix8 <52464204+smix8@users.noreply.github.com> | 2023-02-10 00:52:18 +0100 |
---|---|---|
committer | smix8 <52464204+smix8@users.noreply.github.com> | 2023-02-10 17:13:40 +0100 |
commit | f2c31965c04f17f05d534646ffb5056237a5cdde (patch) | |
tree | 6a307c71a8923760bb9a3f918fd8b446efa4c76f /doc | |
parent | 929ee61170ec4d431d6d2cfeddccdec2a59a11b7 (diff) |
Fix navigation support for multilayered TileMaps
Fixes support for multilayered TileMaps by creating dedicated navigation maps for each layer.
Diffstat (limited to 'doc')
-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 5dedea50d0..0d2368691f 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" /> |