Quantcast
Channel: Questions in topic: "lockcursor"
Viewing all articles
Browse latest Browse all 92

Camera Lock on GUI

$
0
0
I've made a Pause menu for my mini game, but for some reason when i hit escape for the first time, the camera wont stop moving.Its only after i go back into the game and press it again that it works. I'm using a Free camera from the assets store but i also get this problem when using the FPS Controller. I'm using: canvas.gameObject.SetActive(true); Time.timeScale = 0; Player.GetComponent().enabled = false; Cursor.visible = true; Screen.lockCursor = false; } else { canvas.gameObject.SetActive(false); Time.timeScale = 1; Player.GetComponent().enabled = true; Cursor.visible = false; Screen.lockCursor = true; I've also tried using cursor.lockstate but that doesn't work either. As far as i can tell there are no conflicting scripts either. Any help would be greatly appreciated!.

Viewing all articles
Browse latest Browse all 92

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>