Quantcast
Channel: Questions in topic: "stopping-animation"
Viewing all articles
Browse latest Browse all 60

boolean to stop animation does not work?

$
0
0
Hi, i don't understand why the animation "d1" does not work, d1 is not animating, when i set the boolean "hasPushed" to "true", so that the animation does not repeat : function Update () { //... /* push */ if ( (hasPushed==false) && (Vector3.Distance(playerToFollow.position, thisTransform.position) < (dist/3) ) ){ animation.CrossFade("d1"); playerToFollow.GetComponent(official).desD = true; hasPushed = true;/* HERE : without it, it works fine but does not stop */ /* walk */ } else if ( Vector3.Distance(playerToFollow.position, thisTransform.position) < (dist/1.3) ){ animation.CrossFade("slow"); } How could i stop the animation with something else than a boolean? Thanks

Viewing all articles
Browse latest Browse all 60

Trending Articles



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