diff options
| author | Rémi Verschelde | 2017-04-20 16:32:20 +0200 |
|---|---|---|
| committer | GitHub | 2017-04-20 16:32:20 +0200 |
| commit | ebddc57eb1cf887f545c02d97c1938577aef9647 (patch) | |
| tree | 0a009e28b66e2ef0d6b23d51aae52e680e8ead6c | |
| parent | 90576e0c7a446977dfe9fc7aa572a3b98974a1cc (diff) | |
| parent | f5be049dd87ab7cfbd89292a86dd1139d6a78624 (diff) | |
| download | godot-ebddc57eb1cf887f545c02d97c1938577aef9647.tar.gz godot-ebddc57eb1cf887f545c02d97c1938577aef9647.tar.zst godot-ebddc57eb1cf887f545c02d97c1938577aef9647.zip | |
Merge pull request #8466 from RandomShaper/fix-ik-2.1
Fix IK not being solved while dragging a bone (2.1)
Diffstat (limited to '')
| -rw-r--r-- | editor/plugins/canvas_item_editor_plugin.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp index 59abf1557..638d54a2d 100644 --- a/editor/plugins/canvas_item_editor_plugin.cpp +++ b/editor/plugins/canvas_item_editor_plugin.cpp @@ -834,7 +834,7 @@ void CanvasItemEditor::_prepare_drag(const Point2 &p_click_pos) { se->undo_pivot = canvas_item->cast_to<Node2D>()->edit_get_pivot(); } - if (selection.size() == 1 && selection[0]->cast_to<Node2D>()) { + if (selection.size() == 1 && selection[0]->cast_to<Node2D>() && bone_ik_list.size() == 0) { drag = DRAG_NODE_2D; drag_point_from = selection[0]->cast_to<Node2D>()->get_global_pos(); } else { @@ -1360,7 +1360,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent &p_event) { } } - if (drag != DRAG_NONE && (!Cbone || drag != DRAG_ALL)) { + if (drag != DRAG_NONE && (!Cbone || (drag != DRAG_ALL && drag != DRAG_NODE_2D))) { drag_from = transform.affine_inverse().xform(click); se->undo_state = canvas_item->edit_get_state(); if (canvas_item->cast_to<Node2D>()) |
