From fee04ccd93ee3cd7d1e2309436343daedb51f0c3 Mon Sep 17 00:00:00 2001 From: reejk Date: Tue, 29 Nov 2022 21:26:42 +0400 Subject: Use TileSet navigation layer layers when TileMap generates navigation polygons --- scene/2d/tile_map.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'scene/2d') diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 6ab13c9aa7..3136752a2e 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -1739,6 +1739,7 @@ void TileMap::_navigation_update_dirty_quadrants(SelfList::List NavigationServer2D::get_singleton()->region_set_owner_id(region, get_instance_id()); NavigationServer2D::get_singleton()->region_set_map(region, get_world_2d()->get_navigation_map()); NavigationServer2D::get_singleton()->region_set_transform(region, tilemap_xform * tile_transform); + NavigationServer2D::get_singleton()->region_set_navigation_layers(region, tile_set->get_navigation_layer_layers(layer_index)); NavigationServer2D::get_singleton()->region_set_navigation_polygon(region, navigation_polygon); q.navigation_regions[E_cell].write[layer_index] = region; } -- cgit v1.2.3