Cursor lock not working on Unity 2019.4.19F1 for WebGL

Hi everyone !
Been searching over a lot of different website and questions about this but I couldn’t find the answer.

Cursor.lockState = CursorLockMode.Locked; is working in the Unity Editor, but it’s not working in the WEBGL.

I’ve put it in the update, after a MouseDown. Can’t figure it out.
The cursor is lock, not in the center of the screen, but where I clicked when I entered the WEBGL online.

Does anyone has the answer to center and lock the mouse in WEBGL ?

Thank you in advance.

Hi,

We just fixed this issue and we will backport the fix to 2019.4 soon.

1 Like

Alright thank you for that !
Will it be fixed on 2020.3 LTS as well ?

Hi,

yes, it will. :slight_smile:

1 Like

Awesome !