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

ApplyDamage Error

$
0
0
I am trying to get my MecaAnim character to attack my player, so far ive got it to work but the problem I cant figure out is that im only getting damaged when im behind the enemy.. help please lol float distance = Vector3.Distance(shootTarget.position, myTransform.position); // If close enought to shoot a laser beam in the target person if (distance <= shootDistance) { shootTarget.gameObject.SendMessage("ApplyDamage", 5.0F); int rand = UnityEngine.Random.Range(0, 50); animator.SetBool(AttackParameterName, rand == 20); idleAfterShootingTimeCounter = idleTimeAfterShooting; }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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