diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-08-07 19:45:54 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-08-07 19:45:54 +0200 |
commit | 4f233300b6f3fd12d82ab83d22f1e9e47fd727e2 (patch) | |
tree | b65faf2dc04705ad52a75a15dcdea9185a003c4f | |
parent | f754dd20be5d69cd94ea83ceee8c7fb72f5d3507 (diff) |
Remove FOV adjustment with Alt + mouse wheel in the 3D editor
This shortcut got in the way when using the Maya navigation scheme,
and also when using the slow freelook modifier (regardless of
navigation scheme).
-rw-r--r-- | editor/plugins/node_3d_editor_plugin.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp index 005d5fc951..6afc6798d0 100644 --- a/editor/plugins/node_3d_editor_plugin.cpp +++ b/editor/plugins/node_3d_editor_plugin.cpp @@ -1386,25 +1386,17 @@ void Node3DEditorViewport::_sinput(const Ref<InputEvent> &p_event) { const real_t zoom_factor = 1 + (ZOOM_FREELOOK_MULTIPLIER - 1) * b->get_factor(); switch (b->get_button_index()) { case MouseButton::WHEEL_UP: { - if (b->is_alt_pressed()) { - scale_fov(-0.05); + if (is_freelook_active()) { + scale_freelook_speed(zoom_factor); } else { - if (is_freelook_active()) { - scale_freelook_speed(zoom_factor); - } else { - scale_cursor_distance(1.0 / zoom_factor); - } + scale_cursor_distance(1.0 / zoom_factor); } } break; case MouseButton::WHEEL_DOWN: { - if (b->is_alt_pressed()) { - scale_fov(0.05); + if (is_freelook_active()) { + scale_freelook_speed(1.0 / zoom_factor); } else { - if (is_freelook_active()) { - scale_freelook_speed(1.0 / zoom_factor); - } else { - scale_cursor_distance(zoom_factor); - } + scale_cursor_distance(zoom_factor); } } break; case MouseButton::RIGHT: { |