Discord
Login
Community
DARK THEME

mouse.x and mouse.y

how do I make "mouse.x" and "mouse.y" always follow the mouse and not just when the screen is clicked

In some browsers, the mousemove event only fires when the page is focused. One thing you can do is pause the game when the window is unfocused.

There is also an option to take control of the mouse.

After clicking on the game area (screen), you will take control of the mouse and a message will appear (pop-up) that this page is now exclusive to the mouse, even if you move the mouse outside the game area (screen), the game will still receive data about the mouse position. To exit this mode, you must click ESC.

https://microstudio.dev/community/questions/mouse-lock-and-mouse-hide/924/

https://microstudio.dev/i/Loginus/pointerlock/

🤜🤛👍

Me personally I use mouse.Z

Post a reply

Progress

Status

Preview
Cancel
Post
Validate your e-mail address to participate in the community