Fixed mouse in browser game


I fixed the mouse going off of the window for the in-browser game by adding a single line of code:

Cursor.lockState = CursorLockMode.Locked;

You kind of have to click in and click out and click back in the window though...


It was this easy the whole time yet I over complicated it with trying to warp the mouse and stuff 😭💀

Also I allowed users to change mouse sensitivity which is cool :))

Files

Wildlife Wasteland.zip Play in browser
Apr 03, 2024

Get Wildlife Wasteland

Leave a comment

Log in with itch.io to leave a comment.