summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-02-27 11:33:45 +0100
committerGitHub <noreply@github.com>2019-02-27 11:33:45 +0100
commitf0f277faf1c1506443d549aacdc3b52ca9a55d61 (patch)
treed65d3e5ee09d4cbee63b754b701b8e99ef0482ca /editor
parent8889089c1b81fc81538ede2ef097328a6f62ddf0 (diff)
parent657f83148c18381f87b55ab5013f76ebef573bfb (diff)
Merge pull request #26330 from AlmostBearded/tileseteditor_multiplecollisionshapes
Allow Creation of Multiple Collision Shapes for Tiles
Diffstat (limited to 'editor')
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index 1bcb7513e0..5f4c4a610a 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -1425,6 +1425,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
workspace->update();
} else {
creating_shape = true;
+ edited_collision_shape = Ref<ConvexPolygonShape2D>();
current_shape.resize(0);
current_shape.push_back(snap_point(pos));
workspace->update();
@@ -1444,6 +1445,7 @@ void TileSetEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
} else if (tools[SHAPE_NEW_RECTANGLE]->is_pressed()) {
if (mb.is_valid()) {
if (mb->is_pressed() && mb->get_button_index() == BUTTON_LEFT) {
+ edited_collision_shape = Ref<ConvexPolygonShape2D>();
current_shape.resize(0);
current_shape.push_back(snap_point(shape_anchor));
current_shape.push_back(snap_point(shape_anchor + Vector2(current_tile_region.size.x, 0)));