summaryrefslogtreecommitdiff
path: root/editor/plugins/tile_set_editor_plugin.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-06-08 18:15:51 +0200
committerGitHub <noreply@github.com>2018-06-08 18:15:51 +0200
commit3aed396a30d4cbcfb4a63c14b8416dad024808b2 (patch)
treef7fe4162f6614eb2d3aad8fffe14d015f5bd43b4 /editor/plugins/tile_set_editor_plugin.cpp
parent69058d33fc3ab22407a0b2b70cf24075c9e38c0e (diff)
parentd73cdeb2487bbd21d2eb062a13d92199c85cda2f (diff)
Merge pull request #19343 from bojidar-bg/x-fix-tilemap-shape-rotation
Fix bugs related to bad handling of rotated/translated shapes in tilemap
Diffstat (limited to 'editor/plugins/tile_set_editor_plugin.cpp')
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp4
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++) {