18 lines
342 B
C#
18 lines
342 B
C#
using UnityEngine;
|
|
|
|
public class CameraController : MonoBehaviour
|
|
{
|
|
[SerializeField] private GameObject player;
|
|
private Vector3 offset;
|
|
|
|
private void Start()
|
|
{
|
|
offset = new Vector3(0, 3.5f, -7.4f);
|
|
}
|
|
|
|
private void LateUpdate()
|
|
{
|
|
transform.position = player.transform.position + offset;
|
|
}
|
|
}
|