|
Im trying to create a 'pause-game' button, so far I've managed to pause the game and sound. But Im having trouble pausing the camera (Mouse Look Script), is there something I have not added to the script? Appreciate any help. var pausedGUI : GUIText; pausedGUI.enabled = false; static var pauseVisible : boolean; private var player : GameObject; private var cam : GameObject; function Start() {
} function Update () { if(Input.GetKeyUp("p")){ if(paused == true){ paused = false; } else { paused = true; }
}
(comments are locked)
|
|
I heavily modified the pause menu script found on the Unity wiki for my own game. I pasted below a link to the code I used (in JavaScript). I also posted this on the most popular pause game question thread, but I doubt anyone will ever consider looking at it since the question already has 11 answers. Look at the UnPauseGame and PauseGame functions for how to solve the MouseLook problem, but if you want you can just use the whole script. Thank you so much...the problem is finally solved. Definately a great script for helping first time game devs.
May 10 '11 at 04:21 PM
Ben 39
I'm glad I could help.
May 14 '11 at 07:49 AM
Justin 3
(comments are locked)
|
