WebGL Input System Mouse Stops and Screen Edge

I am using the 1.4.4 Input System package in Unity 2021.3 with the Third Person starter project that you can download into the Unity Hub.

It works great except for one thing. The camera follows the mouse movement until the mouse hits the edge of the screen. Then you can’t turn any further.

In a previous version (I think it was 1.4.2), the mouse would get captured by the app and you had to hit ESC to get the cursor to show up, but in that version the mouse wouldn’t work on any of the UI elements in the game even when the cursor was visible.

Now the mouse cursor is always visible and works on all UI elements, but has the problem stated above.

You can change how it works with this:

Edit: …and toggle visibility of the mouse with this:

1 Like

I just looked at the Starter Assets Input script that comes with this template and it has 2 checkboxes (that are checked):

Cursor Locked
Cursor Input For Look

I would think those should be doing what you are talking about, but they are not working in WebGL apparently.

Her is a weird thing. It looks like sometimes when I run the app it locks the cursor and the mouse works fine and other times it doesn’t. I think it has to do with when I have it set to run in WebGL or not.

I have the same issue. How did you solve it?

I never did solve it.