Unity Project
This commit is contained in:
18
Assets/Content/Scripts/LerpDemo.cs
Normal file
18
Assets/Content/Scripts/LerpDemo.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user