- Home /
Animation not playing , please help
I have a Camera with a simple animation on it ( rotation , it is of 7 seconds). I have made a script through which i want to trigger the animation, but it doesn't seem to work. Here is the code and the Settings.
settings
Answer by syclamoth · Oct 06, 2011 at 09:22 AM
Try putting that code in the 'Start' function instead, so that it only executes once instead of every frame. Possibly, the problem is that it is constatly trying to start the animation, and so it is resetting it to the beginning every time!
Also, you can't use WaitForSeconds outside of a coroutine- if you use SendMessage like that, instead of StartCoroutine, it will skip straight past that line.
no luck , i noticed something - the animation doesn't play even when i check play automatically
How did you make your animation? There might be other things interfering here that you haven't told us about (possibly because you didn't think they were important). For example, how is the camera moved when it is not animating?
alright , first of all the animation is made in Unity. Second the camera is a FPS camera , it is controlled by player when its not moving by engine
i got it working by changing Update to start and reseting the variables of script and Camera (animation ) thanx :D
Your answer
![](https://koobas.hobune.stream/wayback/20220613000138im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Camera Pan 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
Good Game by One Person, Is it Possible? 2 Answers