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

public class camfollow : MonoBehaviour
{
    public GameObject Camera;
    public Transform Player;

    public float smoothSpeed = 0.125f;
    public Vector3 offset;


    // Start is called before the first frame update
    void FixedUpdate ()
    {
        Vector3 desiredPosition = Player.position + offset;
        Vector3 smoothPosition = Vector3.Lerp(transform.position, desiredPosition, smoothSpeed);
        transform.position = smoothPosition;
    }


}
