-
Notifications
You must be signed in to change notification settings - Fork 46
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
First nonzero mouse_delta_ndc() is very large #188
Comments
To fix this, we probably need to store initial mouse position on |
Yes, I can try to help. It seems the best way would be to store mouse position on Another option is to store |
Heh, indeed. There's no method to get mouse position (without using event loop). Okay, then we should try approach with setting cursor to the center of the window on start. I don't like idea with NaNs, it seems harder and possibly more dangerous. |
It seems unfortunate that we should have to move the cursor to fix a bug that very few people will run into :-) If you don't like NaNs, a semantically equivalent option is to put the |
Well, you can try, but I think the internal structure of our code will be overengineered then. The approach with moving cursor will envolve a very small code injection in one place, while you'll need to change a lot of logic to use |
The necessary changes are actually quite minimal: https://github.com/kbarros/three/commit/faf9e58f8cc685c8f420327e961939d58adfd6e4 Note that we may wish to change |
On second thought, maybe this should be closed as "won't fix" until glutin gets the ability to query the mouse position? |
We can keep it for tracking, marking as blocked for now. |
I put the following line of code in my
win.update()
loop:At first, the program prints exactly
Vector2 [0.0, 0.0]
. Once the mouse moves, I first get a single very large delta, of order 0.5. And then after that, mouse motion gives meaningful deltas, of order0.001
(corresponding to a few pixels of movement).I would have expected that all return values of
mouse_delta_ndc()
correspond to actual mouse deltas.The text was updated successfully, but these errors were encountered: