Hi, Im creating a game that needs a moving train for a mission. I have all the points where the track changes direction marked in an array using empty game objects. Im using lerp to move the train model from the points, however I want the speed of the train to change based on player input. How would I go about doing this. Im using the lerp code found on the official docs: Unity - Scripting API: Vector3.Lerp
On the docs it says the speed is here:
float distCovered = (Time.time - startTime) * speed; <-------
However what if I want to change speed in the middle of 2 points?