- Home /
first person - hide mouse
I am making a first person game and i want to know how to make it so you don't see the mouse in game.
Answer by oliver-jones · Dec 02, 2010 at 02:08 AM
Try this:
Screen.showCursor = false;
And just place that into a game empty on your scene.
--- More Complex ---
var Paused = false;
function Update(){
Screen.showCursor = false;
if(Input.GetKeyDown("p") && Paused == false){ Screen.showCursor = true; Paused = true; }
if(Input.GetKeyDown("p") && Paused == true){ Screen.showCursor = false; Paused = false;
This allows you to view cursor when in a pause state.
Thanks, the 3rd line of code: Screen.showCursor = false is what I missed :p
Your answer
Follow this Question
Related Questions
Disable/enable script and animation when you move your mouse cursor 1 Answer
Mouse cursor disappears in Web Player 0 Answers
Cant unlock cursor with FPS prefab 2 Answers
Cursor lock not working after alt tab 2 Answers
Hide mouse cursor on startup 2 Answers