Cursor Locked.

I’m working on my horror game that is soon finished. I Currently Have 3 Scenes

  1. Titlescreen
  2. Game
  3. Jumpscare

And When you enter Game your cursor locks as it should. But when you get jumpscared (and it transfers you to the jumpscare scene) the cursor remains locked.

Here’s the code for the lock cursor:

void Start()
{
Cursor.lockState = CursorLockMode.Locked;
}

@CodyProductions

“And When you enter Game your cursor locks as it should. But when you get jumpscared (and it transfers you to the jumpscare scene) the cursor remains locked.”

You state cursor remains locked - do you actually mean by this that it shouldn’t be locked?

If you set your cursor lock state in the Start, why couldn’t you set it to other state when it no longer needs to be locked?

1 Like

Thank you dude :slight_smile: (Im just new haha)