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

public class CamFoot : MonoBehaviour {

    private float yOffset = 0.5f;

    public Transform playerTransform;
    private float slerpSpeed = 100.0f;

    void FixedUpdate () {
        Vector3 playerPosition = playerTransform.position;
        playerPosition.y += yOffset;

        Vector3 newPosition = Vector3.Slerp(transform.position, playerPosition, Time.fixedDeltaTime * slerpSpeed);

        transform.position = newPosition;
	}
}
