Quantcast
Channel: Questions in topic: "javascipt"
Viewing all articles
Browse latest Browse all 1875

Can't get Animation to stop

$
0
0
I have this function to play an animation then wait a few seconds then it changes the Boolean to false to stop the animation. I can't get it to work, he doesn't stop looping the animation. Is there a better way to do this? How can I make it so that he just plays the animation once and doesn't loop it? Also, here's my code, which probably sucks. function KnifeThrow() { var myAnimator: Animator= GetComponent(Animator); myAnimator.SetBool("Throw Knife",true); ; yield WaitForSeconds(2); myAnimator.SetBool("Throw Knife",false); }

Viewing all articles
Browse latest Browse all 1875

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>