Roatate object to player on tag
Hey guys,
I have a script which is working fine, I know it is simple but I am a little stuck at the moment.
Basically, I have a script where the "enemy" follows the player. Now, what I need is that the enemy rotate always on the player.
transform.Rotate(Vector3.forward 20f Time.deltaTime);
This is the script I currently got, which will rotate the enemy, what I need is something like this:
transform.position = Vector3.Lerp(transform.position, GameObject.FindGameObjectWithTag("Player").transform.position, 1f * Time.deltaTime);
This script works fine too, it will follow the player on tag. What I need to do is rotate the enemy on the player tag. Something like LookAt(Target) but that will screw up the game, since it is in 2D and the rotation will not work. Any ideas?