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

public class CameraFollow : MonoBehaviour {

	public Transform Player;
	public float CameraFollowSpeed;
	public float smoothTime = 0.3f;
	public Vector3 offset;
	private Vector3 velocity = Vector3.zero;

	void Update(){
		Vector3 targetPosition = new Vector3 (Player.transform.position.x, Player.transform.position.y + 1, Player.position.z) + offset;

		transform.position = Vector3.SmoothDamp (transform.position, targetPosition, ref velocity, smoothTime);
	}

}