Change main Camera to another camera with a Trigger then back with a Timer.

I'd like to turn off the main camera on the player, then switch to a separate static camera with a Trigger that the player would walk over.

I’ve seen alot of switching camera scripts, but all with “Input.GetKeyDown”.

I figure a timer would work that would be as long as the video i have on a plane, but to go back to the main camera as well.

Any help would be appreciated. Thanks!!

From as best I can tell this script should point you in the right direction. You'll have to assign camera 1 and camera 2 and the movie texture in the scene when you attach the script to something that has a collider set to be a trigger.

var camera1 : Camera;
var camera2 : Camera;
var movie : MovieTexture;
private var isPlaying : Boolean = false;

function OnTriggerEnter(other : Collider)
{
   if(other.CompareTag("Player"))
   {
      camera1.enabled = false;
      camera2.enabled = true;
      StartMovie();
   }
}

function StartMovie()
{
   if(!movie.isPlaying)
   {
      movie.Play();
      isPlaying = true;
   }
}

function Update()
{
   if(isPlaying && !movie.isPlaying)
   {
      camera1.enabled = true;
      camera2.enabled = false;
      isPlaying = false;
   }
}