The script is supposed to make the camera follow the ball, but for some reason, it doesn’t. I’m pretty new to this and can’t for the life of me figure out why. If it helps, I’m running through the Roll-a-Ball Unity tutorial, and my script looks like it matches up with the one in the video. Any help?
using UnityEngine;
using System.Collections;
public class CameraControl : MonoBehaviour
{
public GameObject player;
private Vector3 offset;
// Use this for initialization
void Start ()
{
offset = transform.position;
}
// Update is called once per frame
void lateUpdate () {
transform.position = player.transform.position + offset;
}
}