|
var Aim : boolean = false; var Cam : GameObject; function Update () { Aim = true; if(Aim == true){ Cam.active = true; } if(Input.GetMouseButtonUp(1)){ Aim = true; if(Aim){ Cam.active = false; } this script don't work for me i press right button but when i relese it doesent change back.
(comments are locked)
|
|
Ok, I just wrote this for you! And please make sure to remember to format your code by selecting it all and pressing the 101010 button at the top next to the paperclip icon! Now what you have to do, is drag your normal, starting camera into the Then, you're ready to go! I think what you were lacking in your original script was the ability to detect what camera was currently enabled, and to then be able to switch back and forth! I hope this works for you! If you have any more issues, then just let me know!!!!! -Grady
(comments are locked)
|
