using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ThirdPersonCameraFollow : MonoBehaviour
{
private Transform target;
public float distanceUp = 10f;
public float distanceAway = 15f;
public float smooth = 2f;
void Start()
{
target = GameObject.FindWithTag("Player").transform;
}
void LateUpdate()
{
Vector3 disPos = target.position + new Vector3(distanceAway, distanceUp, distanceAway);
transform.position = disPos;// Vector3.Lerp(transform.position, disPos, Time.deltaTime * smooth);
transform.LookAt(target.position);
}
}