Trigger a video clip

Hello, I’m working on a FPS platformer game, as the player walks down a hall he will trigger a video that will play (a man black out (stop motoin animation)) i was wondering how i would trigger the video to start playing ?

Here is the basic overview of what you need (besides Unity Pro):

  1. A collider to trigger the movie
  2. A plane to project the movie on

You can decide whether the collider will also be the plane for the movie. Assuming it is, you can add the following script to your plane:

var movieFile : MovieTexture;

function OnTriggerEnter (col : Collider) {
	//This gets called when the player hits the movie plane
	if (col.gameObject.name.StartsWith("Player")) { //Check that we are dealing with the player.
		 renderer.material.mainTexture = movieFile; // Assign the movie to the renderer.
   		 movieFile.Play(); //Play the movie on the plane
    }
}

All you need to do is import your movie file to the assets folder, assign it as the movieFile variable for the script and enjoy.

Let me know if you want the collider to be separate from the movie plane.