- Home /
Question by
The_Thinker · Dec 13, 2014 at 09:20 PM ·
animationtwo
two animations
Is there a way to have two animations on one gameobject, or get an animation to play backward?
Comment
You can add any number of animation in one object...... To do that you have to add animation comopnet ...
Check out unitys YouTube vids on animator scripting and the animator component. These tuts are really good.
I got the two animations I wanted now how can i get the 2nd to play ontrigerexit. The first is triggered by onetriggerenter how would i do ontriggerexit
Answer by MajdHamada · Dec 14, 2014 at 12:46 PM
like this only if your animation a lagacy animation
function OnTriggerExit (other:Collider){
if( other.collider.tag=="yourObject"){
animation.Stop( "firstone");
animation.Play("secand");
}
}
Your answer
![](https://koobas.hobune.stream/wayback/20220613174000im_/https://answers.unity.com/themes/thub/images/avi.jpg)