From 5c3600b29fbc02e92a3ccbd86a9da46efd03bac2 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Thu, 13 Jan 2022 18:13:50 +0000 Subject: Fix mouse velocity not changing fast enough - Uses all accumulated movements when calculating velocity - Discards old accumulated movements - Sets last mouse velocity to zero when there is no movement --- doc/classes/Input.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'doc/classes') diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 45b15331d2..7129f2b67d 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -141,10 +141,10 @@ Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. - + - Returns the mouse velocity for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion. + Returns the last mouse velocity. To provide a precise and jitter-free velocity, mouse velocity is only calculated every 0.1s. Therefore, mouse velocity will lag mouse movements. -- cgit v1.2.3