So i've been trying to make an enemy follow my player on Unity2d using transform.LookAt
.
While it does follow the player, It also rotates the enemy as well in 3D but my sprite is made for 2d so the sprite just vanishes. Any ideas?
//follows player
transform.position = Vector2.MoveTowards(transform.position, target.position, speedEnemy * Time.deltaTime);
//make enemy look towards player
transform.LookAt(target);