From efed435fa3d8457354727e6f8ad1aa13703ef9ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A3=8E=E9=9D=92=E5=B1=B1?= Date: Thu, 26 Jun 2025 20:00:34 +0800 Subject: [PATCH] Fix `screen_accum` not being reset when it should be in `Input::VelocityTrack` Resets `screen_accum` like `accum`. --- core/input/input.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/input/input.cpp b/core/input/input.cpp index 9225d82245a..50e6abaea2c 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -253,13 +253,16 @@ void Input::VelocityTrack::update(const Vector2 &p_delta_p, const Vector2 &p_scr velocity = accum / accum_t; screen_velocity = screen_accum / accum_t; accum = Vector2(); + screen_accum = Vector2(); accum_t = 0; } void Input::VelocityTrack::reset() { last_tick = OS::get_singleton()->get_ticks_usec(); velocity = Vector2(); + screen_velocity = Vector2(); accum = Vector2(); + screen_accum = Vector2(); accum_t = 0; }