diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 2a582a12499..44cc01ad2d8 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -402,6 +402,12 @@ void AnimationNodeStateMachineEditor::_state_machine_gui_input(const Ref pan_gesture = p_event; + if (pan_gesture.is_valid()) { + h_scroll->set_value(h_scroll->get_value() + h_scroll->get_page() * pan_gesture->get_delta().x / 8); + v_scroll->set_value(v_scroll->get_value() + v_scroll->get_page() * pan_gesture->get_delta().y / 8); + } } void AnimationNodeStateMachineEditor::_file_opened(const String &p_file) {