So I am making a horror game, and right now i’m working on the cutscene part of the game. The cutscene takes place in a car driving down a street. At the end of the street I have a trigger and what I want to happen is when the car runs into the trigger, the camera switches.
Here is the code I have so far
Please Help! Thanks
#pragma strict
var camera1 : Camera;
var camera2 : Camera;
function Start()
{
camera1.camera.enabled = true;
camera2.camera.enabled = false;
}
function OnTriggerEnter()
{
camera1.camera.enabled = false;
camera2.camera.enabled = true;
camera2.animation.Play();
}