I am a beginner and im wanting to make a pause menu you that the player can interact with just like the main menu. i want there to be a “quit game” “save game” and “resume” button. this is the script i have so far. the script works but you can still move your head around in the game it disables the moving of the character though. i need help stopping the camera from moving when paused, and itd be helpful if you could suggest how i make the menu interactive like i want them to quit from the pause?
SCRIPT:
var pause : boolean = false;
var pauseGUI : GUITexture;
pauseGUI.enabled = false;
function Update(){
if(Input.GetKeyUp(KeyCode.Escape)) {
if(pause==true){
pause = false;
}
else {
pause = true;
} if(pause == true) {
Time.timeScale = 0.0;
pauseGUI.enabled = true;
}
else {
Time.timeScale = 1.0;
pauseGUI.enabled = false;
}
}
}