I basically want to make it so whenever I press Escape it will make it so the camera does not move… I have this and I want to add on to it basically. I don’t know how to use Vectors or Transforms very well so if you can also explain with the // function that’d be perfect, thanks in advance!
My pause code:
#pragma strict
private var paused: boolean = false; //variable for detect state game pause/unpause
function Update() {
//Best use KeyCode
if(Input.GetKeyDown(KeyCode.Escape)) {
if(paused) {
Time.timeScale = 1;
paused = false;
} else {
Time.timeScale = 0;
paused = true;
}
}
}