Hi!
I’m trying to lock the mouse on the center of the screen for a first person game, but Cursor.lockState isn’t working. In Monodevelop it doesn’t recognise the ‘=’ sign in the line:
Cursor.lockState = CursorLockMode.Locked;
Hi!
I’m trying to lock the mouse on the center of the screen for a first person game, but Cursor.lockState isn’t working. In Monodevelop it doesn’t recognise the ‘=’ sign in the line:
Cursor.lockState = CursorLockMode.Locked;
This worked for me:
function Update ()
{
Cursor.visible = false;
Cursor.lockState = CursorLockMode.Locked;
}
Do you have the latest main unity build (5.5.0f3) or the patch version (5.5.0p1). You need to get the patch version, which fixes the bug you have: https://unity3d.com/unity/qa/patch-releases?_ga=1.212164884.1220397441.1481226827
– chrisb1976