-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[rcore_desktop] Inacurate mouse delta with DisableCursor()
#3875
Labels
platform: Linux
Linux platform
Comments
freakmangd
changed the title
[rcore_desktop/rcore_web] Innacurate Mouse Delta When Using DisableCursor On Linux
[rcore_desktop/rcore_web] Inacurate Mouse Delta When Using DisableCursor On Linux
Mar 17, 2024
@freakmangd After implementing #3874, is the issue still present on Linux? Related issue on Web: #3916 |
raysan5
changed the title
[rcore_desktop/rcore_web] Inacurate Mouse Delta When Using DisableCursor On Linux
[rcore_desktop] Inacurate mouse delta with Apr 21, 2024
DisableCursor()
@freakmangd Nice! Closing this issue! Web will be tracked on #3916. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue description
When running the "3d camera free" on Linux in both web and desktop,
GetMouseDelta()
is more biased to mouse movements up and to the left. This becomes more noticeable as the frames per second increase.These can fix the issue without changing raylib's source:
DisableCursor()
withHideCursor()
, with the obvious downside of not locking the cursor anymore.This is sourced within GLFW when using
GLFW_CURSOR_DISABLED
withoutGLFW_RAW_MOUSE_MOTION
, as can be seen with this code also exhibiting the issue:When moving your mouse in a circle, the negatives are consistently larger (in absolute value) than the positives, leading to the up-left drift:
-10995.000000 7994.000000
=> abs difference of 3001-23081.000000 17624.000000
=> abs difference of 5457-35581.000000 29573.000000
=> abs difference of 5908When adding these lines:
The issue disappears:
-27196.000000 27147.000000
=> abs difference of 49-65799.000000 65810.000000
=> abs difference of 11-73800.000000 73830.000000
=> abs difference of 30#3874 implements this fix for rcore_desktop.
Light testing on Windows showed no effect, another reported case was on Arch Linux.
Environment
Platform backend: DESKTOP (GLFW)
OS: Pop!_OS Ubuntu x64
OpenGL version: 4.6 (Compatibility Profile) Mesa 24.0.0-1pop0
170687273522.04~0fa430cGPU: NVIDIA Corporation GA106M [GeForce RTX 3060 Mobile / Max-Q] / Mesa Intel® UH
(Laptop integrated Intel graphics card and a discrete RTX 3060)
Issue Screenshot
mouse_bug_showcase.mp4
In this video I'm moving my mouse in a circle, and the cube is very quickly moving down and to the right, which comes from mouse movements being more sensitive up and to the left.
Code Example
"3d camera free", "3d camera first person", "3d picking", and most likely any example that uses
DisableCursor()
andGetMouseDelta()
together on Linux.The text was updated successfully, but these errors were encountered: