- Home /
 
Animation loop stop?
Hello everybody! I just want to make a horror game and i want a do a scary scene. In the scene the player move into a trigger anda char fly int to air an start rotating. I alredy make a script and the animation but when the animation ends its restarting . how can i loop just the rotetating and play just one the flying up? Thanks for the help
Answer by AndyMartin458 · Jul 14, 2014 at 11:03 PM
You should make two animations. That way you can transition to the just rotating animation when you want to stop rotating and moving up.
 var Sound : AudioClip; 
 var chair : GameObject;
  
 function OnTriggerEnter (col : Collider) {
  
 if(col.gameObject.tag == "Player") { 
 AudioSource.PlayClipAtPoint(Sound, transform.position); 
 FlyingChair.animation.Play(); 
 Destroy(gameObject);
 }
 }
 
                  how can i do this ? here is my script ^^
You'll store both animations. I assume that when it enters the trigger you'll have a line such as FlyingChair.animation = rotationOnlyAnimation; 
Your answer
 
             Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Loop Animation In Script? 2 Answers
Setting animation files' wrapmode 0 Answers
Stopping an animation from looping at the end? 3 Answers
Stop looping animation? 1 Answer