So, I have this simple script that makes a gameobject lerp on the X axis and it keeps getting stuck between two values that change depending on the start and end positions of the lerp and I don’t know why, please help.
For example: 114.9, 115.1, 114.7, 115.3, 114.5, 115.0, 114.6
Here’s the script:
using UnityEngine;
using System.Collections;
public class NewBehaviourScript : MonoBehaviour
{
void Start(){}
void Update()
{
transform.position = Vector3.Lerp(new Vector3(100, 0, 0), new Vector3(1000, 0, 0), Time.deltaTime);
Debug.Log(transform.position);
}
}