diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/scroll_bar.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp index 41f4beb1c9..6044b86ef5 100644 --- a/scene/gui/scroll_bar.cpp +++ b/scene/gui/scroll_bar.cpp @@ -343,7 +343,7 @@ void ScrollBar::_notification(int p_what) { double dist = sqrt(target * target); double vel = ((target / dist) * 500) * get_fixed_process_delta_time(); - if (vel >= dist) { + if (Math::abs(vel) >= dist) { set_value(target_scroll); } else { set_value(get_value() + vel); |