Quantcast
Channel: Questions in topic: "enemy"
Viewing all articles
Browse latest Browse all 1488

Idle , Move and Attack animations

$
0
0
I want the enemy to idle , follow , and attack the player . The thing is I want the enemy to use it's move animation when following the player , and use the attack animation when the player is in distance , and ldle back when the player is dead . I am having some problems. Here is my java script : var other : Transform; function Start () { } function Update () { var distance = Vector3.Distance(transform.position, other.transform.position); GetComponent.Animation.Play("attack"); }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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