-
Notifications
You must be signed in to change notification settings - Fork 3
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
Manual mouse movement detection false positives #44
Comments
I could simulate latency by adding |
I got this to be robust by comparing the retrieved mouse position to a queue of mouse positions. It now behaves reliably even with |
Some minor notes from when I closed this:
|
There is a feature for regaining mouse control (pausing the head tracker temporarily) by just moving the mouse normally.
You don't want to interrupt head tracking by accident, so there's a threshold of movement before the mouse will take control from the head tracker.
However, I'm noticing it pausing randomly, perhaps especially when moving the cursor significantly with my head, on Windows 11.
Possible solutions:
setMouseLocation
promise is resolved?Might not work if outstanding promises overlap. If so, there wouldn't be a period of time where the mouse movement detection is enabled, or it would be enabled even though a later request to move the mouse is already in progress, making it sporadic.
I think that should be robust.
How long should the queue be? Points could be removed when
setMouseLocation
resolves, if and only if it's guaranteed thatgetMouseLocation
will return the new position at that point.However, a simple time or count limit should be fine.
Also, this could help:
This would have to be a separate queue of
getMouseLocation
results, rather than a queue ofsetMouseLocation
requests.Should consider framerate independence, and ideally define the threshold in terms of travel within a period of time.
(Should distance be measured in pixels, inches/cm, or screen percentage? probably pixels, to keep it simple.)
Related:
The text was updated successfully, but these errors were encountered: