using UnityEngine;

public class CameraFollow : MonoBehaviour
{

    public GameObject player;
    //public GameObject player2;

    public float timeOffset;

    public Vector3 posOffset;

    private Vector3 velocity;
    
    void Update()
    {
        /*if (player.activeSelf)
        {
            transform.position = Vector3.SmoothDamp(transform.position, player.transform.position + posOffset, ref velocity, timeOffset);
        } else if (player2.activeSelf)
        {
            transform.position = Vector3.SmoothDamp(transform.position, player2.transform.position + posOffset, ref velocity, timeOffset);
        }*/

        transform.position = Vector3.SmoothDamp(transform.position, player.transform.position + posOffset, ref velocity, timeOffset);

    }
}
