private Player player;
public float offset;
private void Start()
{
player = FindObjectOfType<Player>();
}
private void Update()
{
Vector3 difference = player.transform.position - transform.position;
float rotZ = Mathf.Atan2(difference.y, difference.x) * Mathf.Rad2Deg;
transform.rotation = Quaternion.Euler(0f, 0f, rotZ + offset);
}