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

2D/Top Down Enemy Follow

$
0
0
Hi there! I am trying to make my Enemies follow the player in a simple top down 2D fighting game. At the moment, the following script seems is not working for 2D, as the enemies "Flip" to face the player and also seem to be behaving in 3D. What is a simple alternative to make the enemies follow the player? LookAt is causing the issue I think.. transform.LookAt(Player); if(Vector2.Distance(transform.position,Player.position) >= MinDist) { transform.position += transform.forward*MoveSpeed*Time.deltaTime; }

Viewing all articles
Browse latest Browse all 1488

Trending Articles



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