- Home /
Animating a camera
I've set up two buttons to switch between cameras.
Cam1 has an animation attached to it. Herein lies the problem. When I switch to Cam1 the animation doesn't start playing. How do I get this to happen?
If I set it up to play automatically, it camera starts moving when the game starts, and thats not what I want. I only want the camera to start moving when I press "1".
var cam1 : Camera; var cam2 : Camera;
 
               function Update () { 
if(Input.GetKeyDown("1")){ 
cam1.enabled = true; 
cam2.enabled = false;
 }
 if(Input.GetKeyDown("2")){ 
cam1.enabled = false; 
cam2.enabled = true; 
} } 
Answer by reissgrant · Feb 15, 2011 at 04:31 AM
cam1.animation.Play();
OR
cam1.animation.Play("theAnimationName");
Your answer
 
 
             Follow this Question
Related Questions
Best way to go about creating animations 1 Answer
How to make camera position relative to a specific target. 1 Answer
Dynamic Camera Help 1 Answer
Flip The Entire Output in App 0 Answers
Attaching an object to a camera movement weird, Help! 2 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                