summaryrefslogtreecommitdiff
path: root/scene/2d
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-12-21 22:27:40 +0100
committerRémi Verschelde <rverschelde@gmail.com>2022-12-21 22:27:40 +0100
commitdf4d827559e1e59b06c98630e3631b8b3fb23939 (patch)
tree3d934980c1d1ee8f00b019863c5eb9e6f9e3958f /scene/2d
parentb04bc494439193255c85ed9753d28aa92b5adcfa (diff)
parentfee04ccd93ee3cd7d1e2309436343daedb51f0c3 (diff)
Merge pull request #69349 from reejk/tilemap-use-navigation-layer-layers
Use TileSet navigation layer layers when TileMap generates navigation polygons
Diffstat (limited to 'scene/2d')
-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;
}