using System.Collections; using System.Collections.Generic; using UnityEngine; /// /// this code is for the caera to follow the players position. /// public class camera : MonoBehaviour { [SerializeField] GameObject objectToFollow; void Update() { transform.position = objectToFollow.transform.position + new Vector3 (0, 0, -10); } }