using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace EMD.DemoUtility
{
    public class SmoothFollowBehaviour : MonoBehaviour
    {

        [SerializeField]
        private Transform m_Target;

        [SerializeField]
        private float m_SmoothValue = 0.5f;

        void LateUpdate()
        {
            if (m_Target != null)
            {
                transform.position = Vector3.Lerp(transform.position, m_Target.position, m_SmoothValue);
                transform.rotation = Quaternion.Lerp(transform.rotation, m_Target.rotation, m_SmoothValue);
            }
        }
    }
}