Skip to content
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

MouseMotion delta is not precise #467

Closed
infality opened this issue Apr 1, 2023 · 3 comments
Closed

MouseMotion delta is not precise #467

infality opened this issue Apr 1, 2023 · 3 comments

Comments

@infality
Copy link

infality commented Apr 1, 2023

When moving the mouse slightly I can see that the camera is moving along a grid horizontally and vertically and it does not feel smooth. I guess the reason for this is DeviceEvent::MouseMotion.delta returning only whole numbers. As long as I don't move the mouse very quickly the delta values are always either 0 or +/- 1, I never see any values with decimal digits. This results in any slow mouse movement to move at the same speed.

Is this only happening for me? I could not find anything about this online.
I'm on Linux with X11 and tested this on the tutorial12-camera project.
It also behaves like this in the browser on the tutorial page, but it's only noticeable when resized to the full screen.

@II-Day-II
Copy link

Having the same issue on Windows 10. rust-windowing/winit#1418 seems to have some discussion on similar problems, but I am not familiar enough with these crates to find a reasonable workaround.

@II-Day-II
Copy link

Actually, this may be a duplicate of #294.

@infality
Copy link
Author

infality commented Apr 8, 2023

I saw these two issues as well. The first one looked more like a timing issue/lag, with events missing for several milliseconds.
The second might be the same as my problem, I did not really look into it since the camera does behave like this regardless if I move or not. Seems like input needs to be polled more often because the camera is smooth with unlimited fps (no vsync), but I'm also new to this and don't know what needs to be done to receive more DeviceEvent::MouseMotion events per second while keeping the same frame rate.

@infality infality closed this as not planned Won't fix, can't repro, duplicate, stale Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants