初始化
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
using UnityEngine;
|
||||
#pragma warning disable CS0649
|
||||
|
||||
namespace EPOOutline.Demo
|
||||
{
|
||||
public class CameraController : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private Vector3 shift;
|
||||
|
||||
[SerializeField]
|
||||
private float moveSpeed = 2.0f;
|
||||
|
||||
[SerializeField]
|
||||
private Transform target;
|
||||
|
||||
private void Update()
|
||||
{
|
||||
transform.position = Vector3.Lerp(transform.position, target.position + shift, Time.deltaTime * moveSpeed);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user