Skip to content

How to Move to a Position with Lerp

public Transform startPosition;

public float speed;

private void Update()
{
    transform.position = Vector3.Lerp(transform.position, startPosition.position, Time.deltaTime * speed);
}

Leave a Reply

Your email address will not be published.