Switching cameras after a few seconds (SOLVED!)

Hey guys,

I’m using this code…

var Camera : GameObject;
var MainCamera : GameObject;

function Start () {
Camera.camera.enabled=true;
MainCamera.camera.enabled=false;
yield WaitForSeconds(4);
Camera.camera.enabled=false;
MainCamera.camera.enabled=true;
}

to switch between cameras after 4 seconds, I see it working it the inspector but when I get to my main camera I cannot move. My main camera has the fpswalker script. Any ideas what’s wrong?

Anyone?

tnx

that was awsome . very good for make cut scene . it works perfect .

You’re welcome, I’m trying to get the fpswalker working after it switches, not sure why it doesn’t work.

Lol, figured it out. I had a box that I animated to link the camera to that was sitting on top of my camera with the fpswalker, so it does work.