Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

How to disable mouse lock in first person controller ?

$
0
0
I want to cursor be visible on pressing "2" key, I tried every script from internet, the only thing it worked is to make FirstPersonController dissabled, but that doesn't show me a cursor. function Update () { if(Input.GetKeyDown(KeyCode.Alpha2)){ GetComponent(FirstPersonController).enabled = false; Cursor.lockState = CursorLockMode.None; } } (this script is attached to player)

Viewing all articles
Browse latest Browse all 1875

Trending Articles