unity rotate to always face player code example
Example: have something point at the player
using System;
using UnityEngine;
public class LookAtTarget : MonoBehaviour
{
public Transform target;
void Update()
{
if(target != null)
{
transform.LookAt(target);
}
}
}