- Home /
Need help with script and trigger, switching cameras
Help, please, with script, when Player passes through the trigger, the camera "1" switches to "2"
Answer by zero84085 · Jul 18, 2012 at 07:43 AM
Hi my friend , forgive me for my language i don't know very good english i think my script is better because you want to set up the trigger with camera no when press a button change the camera
var Camera1 : Camera;
var Camera2 : Camera;
function OnTriggerEnter(){
Camera1.enabled = false;
Camera2.enabled = true;
}
function OnTriggerExit(){
Camera1.enabled = true;
Camera2.enabled = false;
}
set up the 2 camera's and when you enter the trigger automatic the camera will change after your exit from the trigger the camera go back to normal or the other camera you have set up!
Your answer
Follow this Question
Related Questions
Change skybox at runtime? 2 Answers
Help with movement cube 2 Answers
How to make trigger removes script. 1 Answer
How to make a box (or any object) appear on collide? 1 Answer
Change Player MiniMap Icon 1 Answer