diff options
author | Vito <vitochiarella@gmail.com> | 2017-11-13 07:42:49 +0000 |
---|---|---|
committer | Vito <vitochiarella@gmail.com> | 2017-11-15 09:22:07 +0000 |
commit | 5515d28107d444b84c19f2d14ced89c6f08a53dd (patch) | |
tree | cdc6aba87868b7568e0b556a2741e7ac4ab49506 /scene/2d | |
parent | afec30837c7026251b90fab6f47131db19df278d (diff) |
Fixing tilemap rotation for non top-left tiles.
Diffstat (limited to 'scene/2d')
-rw-r--r-- | scene/2d/tile_map.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index 5fb9e3f527..dd4270ab26 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -459,9 +459,9 @@ void TileMap::_update_dirty_quadrants() { Transform2D xform; xform.set_origin(offset.floor()); - _fix_cell_transform(xform, c, center_ofs, s); + Vector2 shape_ofs = tile_set->tile_get_shape_offset(c.id, i); - xform *= shapes[i].shape_transform; + _fix_cell_transform(xform, c, shape_ofs + center_ofs, s); if (debug_canvas_item.is_valid()) { vs->canvas_item_add_set_transform(debug_canvas_item, xform); |