You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an old issue: see #8414, which was closed even though the issue was still happening. It also happens when the mouse enters the window (the difference between the exit and enter positions are added to the velocity calculation).
Note: #56754 (and it's 3.x version #56755) makes #8414 (MOUSE_MODE_CAPTURED) and the mouse entering the window problem less noticeable, but it's still very noticeable when using Input.warp_mouse_position().
Steps to reproduce
Use Input.warp_mouse_position(), and check Input.get_last_mouse_velocity() (Input.get_last_mouse_speed() on 3.x).
Godot version
3.4.2, 3.5.beta and master 57a057f
System information
Ubuntu 21.10 but confirmed on macOS too
Issue description
When the mouse is warped the instantaneous change in position is not being filtered out for mouse velocity (speed in 3.x) calculations.
On the
linuxbsd
platform, there is code that is supposed to filter these events, but it doesn't appear to be working:godot/platform/linuxbsd/display_server_x11.cpp
Lines 3533 to 3556 in 6a3ff8f
This is an old issue: see #8414, which was closed even though the issue was still happening. It also happens when the mouse enters the window (the difference between the exit and enter positions are added to the velocity calculation).
Note: #56754 (and it's 3.x version #56755) makes #8414 (
MOUSE_MODE_CAPTURED
) and the mouse entering the window problem less noticeable, but it's still very noticeable when usingInput.warp_mouse_position()
.Steps to reproduce
Use
Input.warp_mouse_position()
, and checkInput.get_last_mouse_velocity()
(Input.get_last_mouse_speed()
on 3.x).Minimal reproduction project
3.x: MouseWarpSpeed-3.x.zip
4.0: MouseWarpVelocity-4.0.zip
Note: On 4.0, without #56548, #53894 requires the window to be moved, or unfocused and focused again for
InputEventMouseMotion
events to be received.The text was updated successfully, but these errors were encountered: