diff options
author | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2022-01-13 18:13:50 +0000 |
---|---|---|
committer | Marcel Admiraal <madmiraal@users.noreply.github.com> | 2022-01-13 18:51:34 +0000 |
commit | 5c3600b29fbc02e92a3ccbd86a9da46efd03bac2 (patch) | |
tree | cf66d4699e9b68482d09cb468f3858e96e588818 /doc/classes | |
parent | 2dee116ba7a2aafe303229c5f15abfd6674e56bf (diff) |
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
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Input.xml | 4 |
1 files changed, 2 insertions, 2 deletions
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. </description> </method> - <method name="get_last_mouse_velocity" qualifiers="const"> + <method name="get_last_mouse_velocity"> <return type="Vector2" /> <description> - 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. </description> </method> <method name="get_magnetometer" qualifiers="const"> |