summaryrefslogtreecommitdiff
path: root/editor/plugins/polygon_2d_editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/plugins/polygon_2d_editor_plugin.cpp')
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index e84e782580..896a26c8e8 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -522,10 +522,10 @@ void Polygon2DEditor::_uv_input(const InputEvent &p_input) {
} else if (mb.button_index == BUTTON_WHEEL_UP && mb.pressed) {
- uv_zoom->set_value(uv_zoom->get_value() / 0.9);
+ uv_zoom->set_value(uv_zoom->get_value() / (1 - (0.1 * mb.factor)));
} else if (mb.button_index == BUTTON_WHEEL_DOWN && mb.pressed) {
- uv_zoom->set_value(uv_zoom->get_value() * 0.9);
+ uv_zoom->set_value(uv_zoom->get_value() * (1 - (0.1 * mb.factor)));
}
} else if (p_input.type == InputEvent::MOUSE_MOTION) {