Currently, I am running a script attached to my main camera that follows my player as he moves along the x axis, but ignores the y axis by staying static.
How could I go about modifying this to incorporate a dampening effect to create asmoother camera transition (very jerky at the moment).
using UnityEngine;
using System.Collections;
public class CameraMove : MonoBehaviour {
public Transform player;
void Update ()
{
transform.position = new Vector3(player.position.x + 4, 0, -10);
}
}
Thanks for any help.