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

public class CameraFollow : MonoBehaviour {

    public Transform anchorPosition;
    public float lerpFactor = 0.1f;

    // Update is called once per frame
    void FixedUpdate() {
        if (!anchorPosition.parent.GetComponent<PlayerController>().lostGame) {
            transform.position = Vector3.Lerp(transform.position, anchorPosition.position, lerpFactor);
        }
    }
}
