the brackeys tower defense tutorial, I am making my game in 2d and I’m creating all the sprites and everything, I have been having trouble getting the tower to lock on to the enemy, I know the tower targets the enemy, but because I am in 2D the method of rotating the tower for 3D just makes the tower disappear. Thanks in advanced for any tips!
Vector3 dir = target.position – transform.position;
Quaternion lookRotation = Quaternion.LookRotation(dir);
Vector3 rotation = lookRotation.eulerAngles;
partToRotate.rotation = Quaternion.Euler(0f, 0f, rotation.z);