Skip to content

Commit 6fb5d9e

Browse files
committed
Merge pull request #79485 from smix8/tilemap_cell_size_4.x
Set default `cell_size` on new TileMap Layer navigation layer maps
2 parents 372e9ab + 671839d commit 6fb5d9e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

scene/2d/tile_map.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,8 @@ void TileMapLayer::_navigation_update() {
617617
uses_world_navigation_map = true;
618618
} else {
619619
RID new_layer_map = NavigationServer2D::get_singleton()->map_create();
620+
// Set the default NavigationPolygon cell_size on the new map as a mismatch causes an error.
621+
NavigationServer2D::get_singleton()->map_set_cell_size(new_layer_map, 1.0);
620622
NavigationServer2D::get_singleton()->map_set_active(new_layer_map, true);
621623
navigation_map = new_layer_map;
622624
uses_world_navigation_map = false;

0 commit comments

Comments
 (0)