This script is not working.
function OnTriggerEnter (col : Collider)
{
camera.main.active = false;
animation.Play("heli");
camera.main.active = true;
}
The script disables the camera but does not enable it afterwards.
This script is not working.
function OnTriggerEnter (col : Collider)
{
camera.main.active = false;
animation.Play("heli");
camera.main.active = true;
}
The script disables the camera but does not enable it afterwards.
function OnTriggerEnter (col : Collider)
{
DoStuff();
}
function DoStuff()
{
animation.Play("heli")
camera.main.active = false;
yield WaitForSeconds (AnimationLength);
camera.main.active = true;
}
I have written a script to switch between any no of camera’s
/****************************
*****************************/
var cameras:GameObject;
private var camId:int = 0;
function Update () {
if(Input.GetKeyDown(“c”)){
switchCamera();
}
}
function switchCamera(){
camId++;
if(camId < cameras.Length){
cameras[camId-1].gameObject.active = false;
}
else{
camId = 0;
cameras[cameras.Length-1].gameObject.active = false;
}
cameras[camId].gameObject.active = true;
}
format your code properly and don't demand help asap, if you are that desperate look up the script you are using and learn to fix it yourself.
– anon61858128i think marowi is right edited post to conform
– anon61858128