13 lines
270 B
C#
13 lines
270 B
C#
using UnityEngine;
|
|
|
|
public class CameraPlayerFollow : MonoBehaviour
|
|
{
|
|
private Vector3 _cameraOffset = new(0, 40, 0);
|
|
|
|
void LateUpdate()
|
|
{
|
|
Vector3 newPosition =
|
|
transform.position = Player.Instance.transform.position + _cameraOffset;
|
|
}
|
|
}
|