- Home /
Playing several camera animation
Hi, I use this script to play several camera animation in the scene.
function OnTriggerEnter()
{
camera1.enabled = false;
camera2.enabled = true;
camera2.animation.Play("anim1");
camera2.animation.PlayQueued("anim2", QueueMode.CompleteOthers);
camera2.animation.PlayQueued("anim3", QueueMode.CompleteOthers);
camera2.animation.PlayQueued("anim4", QueueMode.CompleteOthers);
camera2.animation.PlayQueued("anim5", QueueMode.CompleteOthers);
}
I want anim2 runs after anim1 completes its animation and anim3 after anim2 and so on. In this script anim1 runs and anim2 runs after anim1, but other animations don't run at all.what's the problem. Maybe i use wrong function. How can i figure out it?
Comment
my problem was in animation window that anim2 timeline was continue after last keyframe while there was no keyframe in the end. But i can't delete this extra lines. Is there any idea about this problem?
Your answer
![](https://koobas.hobune.stream/wayback/20220613092054im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Camera Pan 1 Answer
Multiple Animation Events Parameter Mecanim 1 Answer
Why isn't Cinemachine switching between cameras? 0 Answers
How to run 1 animation, then other 2 Answers
How to change values of animation? 0 Answers