This is actually just an edit of my older question because I realized this is what was wrong with it. I have my movement script change to be relative to a certain camera depending what trigger it is in. However when I try to apply a similar effect to my camera to deactivate my third person camera and activate my first person camera it doesn’t work.
This is attached to just my third person camera:
var cameraInUse = "big"; //Private me!
var activatedCamera: Camera; //Private me!
var camera1 : Camera;
var camera2 : Camera;
function OnTriggerEnter (trigger : Collider) {
if (trigger.tag == "SmallCameraTrigger1"){
cameraInUse = "small";
Debug.Log("Small camera activated");
camera1.enabled = false;
camera2.enabled = true;
activatedCamera = camera2;
}
}
function OnTriggerExit (trigger2 : Collider) {
if (trigger2.tag == "SmallCameraTrigger1"){
cameraInUse = "big";
Debug.Log("Big camera activated");
camera1.enabled = true;
camera2.enabled = false;
activatedCamera = camera1;
}
}
Any insight will be appreciated, thanks!