I have a First Person Character and in the Standalone build (PC) the rotation along both the axes works fine. But, on the WebGL build, the character can’t finish a full turn (horizontally), and thus, can not look back and physically turn back (the movement is tied to the direction the camera is pointing at).
Any solution would be helpful. I’m at my wits end about this issue.
Thanks in advance.
browsers generally doesn’t allow cursor locking working in a window, so i am guessing your cursor is limited by side of screen.
but when you make the webgl canvas fullscreen you can lock the mouse to you can rotate anywhere you want. (no fullscreen on safari and locking mouse has bugs in firefox. ps: opening developer console on chrome affects how browser handles things so try things without the console)
hope this helps.
If someone needs help with this I manage to solve the problem adding
void Start()
{
Cursor.lockState = CursorLockMode.Locked;
}
When you enter in full screen mode in webgl then you can rotate without problem