You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Fix offset in Viewport drag movement
The initial offset was using the mouse position when the threshold was reached instead of the initial click position. This was adding the drag threshold distance as an extra offset to the final transformation. Now the offset is calculated from the initial click position.
This commit is contained in:
@@ -2339,7 +2339,7 @@ bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
|
||||
|
||||
if (selection2.size() > 0) {
|
||||
drag_type = DRAG_MOVE;
|
||||
drag_from = click;
|
||||
drag_from = drag_start_origin;
|
||||
_save_canvas_item_state(drag_selection);
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user