using UnityEngine;

namespace UNSLOW.EffectPractice.Shared
{
    // カメラに正面を向けるビルボード
    public class FaceCamera : MonoBehaviour
    {
        [SerializeField] private Camera targetCamera;

        private void LateUpdate()
        {
            if(targetCamera == null)
                targetCamera =  Camera.main;
            
            if (targetCamera != null)
                transform.rotation = targetCamera.transform.rotation;
        }
    }
}
