- Home /
Question by
FinleyForster · Apr 28, 2020 at 01:44 PM ·
mouse looklock-cursor
im trying to make my mouse lockstate.locked during gameplay and lockstate.confined when game is over
hi everyone im trying to create a FPS arcade styled game and i have nearly finished. Im having issues with my mouse. During play i want the mouse to be locked in position. and when game is over (on game over screen and title screen) i want it to not be locked but i have no idea how to do it. i have tried a if statement but it did not work here is my code.
if (gameManager.isGameActive)
{
Cursor.lockState = CursorLockMode.Locked;
}
//needs to be locked during game and not a during game over
Comment
Your answer
Follow this Question
Related Questions
How to make the basic mouselook look all the way up and down? 2 Answers
Pop Up GUI Windows & Screen Lock Cursor Question 1 Answer
Use first person camera to trigger IPointer events,Lock mouse without disabling mouse event triggers 1 Answer
How to make a character follow the cursor? 0 Answers
().enabled=false stopped working 1 Answer