summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreejk <github@reejk.xyz>2022-11-29 21:26:42 +0400
committerreejk <github@reejk.xyz>2022-12-22 00:35:20 +0400
commitfee04ccd93ee3cd7d1e2309436343daedb51f0c3 (patch)
treea090eb1aa4d1d36c00f1ea084e28b84bd35d0718
parentf84c308cf828b457628763e9e1fa1a027f641a38 (diff)
Use TileSet navigation layer layers when TileMap generates navigation polygons
-rw-r--r--scene/2d/tile_map.cpp1
1 files changed, 1 insertions, 0 deletions
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<TileMapQuadrant>::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;
}