using System.Collections; using System.Collections.Generic; using UnityEngine; public class CameraManager : MonoBehaviour { public Transform MainCam; public Transform StartingCamera; Vector3 MainCamEulerAngles; public Transform target; // Reference to the character public float speed; private void Start() { MainCamEulerAngles = MainCam.eulerAngles; Invoke(nameof(StartingGameObjDisabler), 2.5f); } void StartingGameObjDisabler() { StartingCamera.gameObject.SetActive(false); } private void Update() { if (speed < 1) speed += Time.deltaTime/10; StartingCamera.position = Vector3.Lerp(StartingCamera.position, MainCam.position, speed); StartingCamera.LookAt(target); //StartingCamera.eulerAngles=Vector3.Lerp(StartingCamera.eulerAngles, MainCamEulerAngles, Time.deltaTime); } }