Path-Creator
Path-Creator copied to clipboard
Moving an object along the path based on Input?
What would be the best(easiest) route to having an object move along the path based on Input interaction? I would assume that the path would need to be set to 0-1 from start to end point?
I did it like this:
if(Input.GetKey(KeyCode.Space)) { distanceTravelled += spd * Time.deltaTime; transform.position = pathCreator.path.GetPointAtDistance(distanceTravelled, end); }
In this case, pressing the spacebar will move the object along the path.
Thanks @ZenyteFury I ended up using iTween but will take another look at Path Creator for my next project 👍