Hi
The way to make it follow the path EXACTLY is to interpolate along it.
float distance = 0;
float speed = 1;
public void Update () {
List<Vector3> points = ...;
distance += Time.deltaTime * speed;
float accum = 0;
for ( int i = 0; i < points.Count-1; i++ ) {
float d = (points[i+1] - points[i]).magnitude;
if ( accum + d >= distance ) {
transform.position = Vector3.Lerp ( points[i], points[i+1], (distance - accum)/d);
return;
}
}
// We have reached the end of the path if we get to this point
}
The above code will move with a speed of [speed] along the specified list of points until it reaches the end of it.