So I figured out how to get my camera to rotate, but i realized that i did it incorrectly. I don’t know how to fix this. Please Help!
Code:
using UnityEngine;
using System.Collections;
public class CameraController : MonoBehaviour {
public GameObject player;
private Vector3 offset;
// Use this for initialization
void Start () {
offset = transform.position - player.transform.position;
}
// Update is called once per frame
void LateUpdate () {
transform.position = player.transform.position + offset;
transform.rotation = ;
transform.Rotate (new Vector3 (45, 0, 0));
}
}