I’m sorry I keep looking at the video (3 of 8 of the roll-a-ball) and my code over and over for camera control but it says
“Can’t add script component ‘CameraController’ because the script class cannot be found. Make sure that there are no compile errors and that the file name and class name match.”
I feel like it’s an easy thing but I keep checking and there’s no errors it tells me it just won’t let me add it in
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour
{
public GameObject player;
//set offset value. It's private because we can set that
//value in the script (? kind of)
private Vector3 offset;
// Use this for initialization
void Start ()
{
//these next few offsets are to stablize the transform distance
//between player and camera so it always stays the same amount apart
offset = transform.position - player.transform.position;
}
// Update is called once per frame
//LateUpdate runs every frame like "Update" but it's guarentee to run
//after all items have been processed in Update (? kind of)
void LateUpdate ()
{
transform.position = player.transform.position + offset;
}
}
Thank you for dealing with me,
Patrick