diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp index f50e7921781..69c5cd1a288 100644 --- a/editor/plugins/spatial_editor_plugin.cpp +++ b/editor/plugins/spatial_editor_plugin.cpp @@ -799,15 +799,15 @@ void SpatialEditorViewport::_sinput(const Ref &p_event) { Ref b = p_event; if (b.is_valid()) { - + float zoom_factor = 1 + (ZOOM_MULTIPLIER - 1) * b->get_factor(); switch (b->get_button_index()) { case BUTTON_WHEEL_UP: { - scale_cursor_distance(is_freelook_active() ? ZOOM_MULTIPLIER : 1.0 / ZOOM_MULTIPLIER); + scale_cursor_distance(is_freelook_active() ? zoom_factor : 1.0 / zoom_factor); } break; case BUTTON_WHEEL_DOWN: { - scale_cursor_distance(is_freelook_active() ? 1.0 / ZOOM_MULTIPLIER : ZOOM_MULTIPLIER); + scale_cursor_distance(is_freelook_active() ? 1.0 / zoom_factor : zoom_factor); } break; case BUTTON_RIGHT: {