19 lines
344 B
C#
19 lines
344 B
C#
using UnityEngine;
|
|
|
|
public class LerpDemo : MonoBehaviour
|
|
{
|
|
public Transform Target;
|
|
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
//transform.position = Target.position;
|
|
transform.position = Vector3.Lerp(transform.position, Target.position, Time.deltaTime);
|
|
}
|
|
}
|