using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CameraController : MonoBehaviour {


    public GameObject target;


    public Vector3 cameraOffset;
    Vector3 startingPos;



    private void Awake()
    {
        if (target)
        Camera.main.transform.LookAt(target.transform);

        startingPos = transform.position;
    }

    // Use this for initialization
    void Start () {
		
	}
	
	// Update is called once per frame
	void Update () {

        transform.position = startingPos + cameraOffset;

	}
}
