I’m trying to program a camera.
function Start () {
FirstPersonCam.enabled = true;
AimCam.enabled = false;
}
var FirstPersonCam : Camera;
var AimCam : Camera;
function Update () {
if(Input.GetMouseButtonDown(1)) {
AimCam.enabled = true;
animation.Play("ZoomIn");
}
if(Input.GetMouseButtonUp(1)) {
animation.Play("ZoomOut");
}
}
I need to be able to disable the AimCam after the ‘ZoomOut’ animation has finished playing. I’m still very new with coding. How can I write this in the GetMouseButtonUp function?