diff options
author | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2018-06-03 16:32:23 +0300 |
---|---|---|
committer | Bojidar Marinov <bojidar.marinov.bg@gmail.com> | 2018-06-03 16:32:23 +0300 |
commit | d73cdeb2487bbd21d2eb062a13d92199c85cda2f (patch) | |
tree | e7b08981bd70a69bbf67fb37e8186676f97a2538 /editor | |
parent | 8684b631182dffebba27bdf538129818321d0d7d (diff) |
Fix bugs related to bad handling of rotated/translated shapes in tilemap
Fixup #18529 and #12870
Diffstat (limited to 'editor')
-rw-r--r-- | editor/plugins/tile_set_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp index c79cf02062..087c4293f1 100644 --- a/editor/plugins/tile_set_editor_plugin.cpp +++ b/editor/plugins/tile_set_editor_plugin.cpp @@ -123,10 +123,10 @@ void TileSetEditor::_import_node(Node *p_node, Ref<TileSet> p_library) { for (List<uint32_t>::Element *E = shapes.front(); E; E = E->next()) { if (sb->is_shape_owner_disabled(E->get())) continue; - Transform2D shape_transform = sb->shape_owner_get_transform(E->get()); + Transform2D shape_transform = sb->get_transform() * sb->shape_owner_get_transform(E->get()); bool one_way = sb->is_shape_owner_one_way_collision_enabled(E->get()); - shape_transform[2] -= phys_offset - sb->get_transform().xform(shape_transform[2]); + shape_transform[2] -= phys_offset; for (int k = 0; k < sb->shape_owner_get_shape_count(E->get()); k++) { |