diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 63fa8cdd353..5ea751f089a 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -3086,7 +3086,7 @@ void TileMap::_build_runtime_update_tile_data(SelfList::List &r // Create the runtime TileData. TileData *tile_data_runtime_use = tile_data->duplicate(); - tile_data->set_allow_transform(true); + tile_data_runtime_use->set_allow_transform(true); q.runtime_tile_data_cache[E_cell.value] = tile_data_runtime_use; GDVIRTUAL_CALL(_tile_data_runtime_update, q.layer, E_cell.value, tile_data_runtime_use); diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index ec9f4806a07..08853679e12 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -2563,7 +2563,7 @@ void TileSet::_compatibility_conversion() { Transform2D xform; xform = flip_h ? xform.scaled(Size2(-1, 1)) : xform; xform = flip_v ? xform.scaled(Size2(1, -1)) : xform; - xform = transpose ? xform.rotated(Math_PI).scaled(Size2(-1, -1)) : xform; + xform = transpose ? Transform2D(xform[1], xform[0], Vector2()) : xform; int alternative_tile = 0; if (!atlas_source->has_tile(coords)) { @@ -2677,7 +2677,7 @@ void TileSet::_compatibility_conversion() { Transform2D xform; xform = flip_h ? xform.scaled(Size2(-1, 1)) : xform; xform = flip_v ? xform.scaled(Size2(1, -1)) : xform; - xform = transpose ? xform.rotated(Math_PI).scaled(Size2(-1, -1)) : xform; + xform = transpose ? Transform2D(xform[1], xform[0], Vector2()) : xform; int alternative_tile = 0; if (!atlas_source->has_tile(coords)) {