I can't get my camera to switch back!

Hey guys,

I have a simple script for switching between first and third person… The script is…

var FirstPersonCamera : Camera;  
var ThirdPersonCamera : Camera;  
function Update()
    {
        if(Input.GetButtonDown("Tab"))
        {
                FirstPersonCamera.enabled = !FirstPersonCamera.enabled;
                ThirdPersonCamera.enabled = !ThirdPersonCamera.enabled;
        }
    }

And it works fine switching to the third person camera… But, it won’t let me switch back! If you guys see an issue somewhere, please point it out…

-Thanks, Gibson

I prefer to moving the camera to a empty co-ordinate instead of disabling it. Setting the camera on and off sometimes causes some havoc situations. Moving the camera to position Vector3(1000000, 1000000, 1000000) and facing away from the game scenes should work fine as it is an empty position, lol.

Or you could change the camera’s depth so only the one camera is rendering which is what I do.