Fix incorrect drawing of alternative tiles
This commit is contained in:
parent
879aac9db4
commit
4b29f71685
1 changed files with 2 additions and 2 deletions
|
@ -2002,7 +2002,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
|
|||
continue;
|
||||
}
|
||||
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(coords, alternative_tile);
|
||||
Vector2 position = rect.get_center();
|
||||
Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(coords, alternative_tile);
|
||||
|
||||
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
|
||||
xform.translate_local(position);
|
||||
|
@ -2026,7 +2026,7 @@ void TileSetAtlasSourceEditor::_tile_alternatives_control_unscaled_draw() {
|
|||
continue;
|
||||
}
|
||||
Rect2i rect = tile_atlas_view->get_alternative_tile_rect(E.tile, E.alternative);
|
||||
Vector2 position = rect.get_center();
|
||||
Vector2 position = rect.get_center() + tile_set_atlas_source->get_tile_effective_texture_offset(E.tile, E.alternative);
|
||||
|
||||
Transform2D xform = alternative_tiles_control->get_parent_control()->get_transform();
|
||||
xform.translate_local(position);
|
||||
|
|
Loading…
Reference in a new issue