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

Teleporting the cursor when at the edge of the screen #73

Open
jespertheend opened this issue Jul 10, 2021 · 0 comments
Open

Teleporting the cursor when at the edge of the screen #73

jespertheend opened this issue Jul 10, 2021 · 0 comments

Comments

@jespertheend
Copy link

Some software like Blender and Unity warp the cursor to the opposite edge of the screen and keep showing the cursor.
This is a better user experience in some cases because the cursor stays visible and it is where you expect it to be after making a short movement.

Take https://pointer-lock-dragging-demo.glitch.me/ for instance. It could be desirable if the cursor stayed visible and moved along with the red circle. This is even more the case when holding a key rather than clicking and dragging. (You can hold spacebar in this demo)

Perhaps an extra flag that can be passed to requestPointerLock() would already be enough for this. Making it possible for developers to set the location of the circle will probably allow for abuse.

This is similar to #27 except that the pointer is teleported rather than clipped.

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

1 participant