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

public class CameraTrack : MonoBehaviour
{
    public GameObject follow;
    public float cameraSpeed;
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        if (follow == null)
        {
            return;
        }

        this.transform.position = Vector3.MoveTowards(transform.position,new Vector3(follow.transform.position.x-5, follow.transform.position.y+9f, follow.transform.position.z - 7),cameraSpeed*Time.deltaTime);
    }
}
