07-13-2016, 01:39 PM
Im spawning and reusing dummy prefabs to move stuff along a spline. But their starting point should vary. When setting the initial position nothing happens when I run, the value isn't applied until the clamp happens ( which is set to loop ).
Any idea what im doing wrong?
Code:
SplineController sc = a.GetComponent<SplineController>();
sc.Position = sc.InitialPosition = sc.Spline.GetNearestPointTF(StartPoint.position) * sc.Spline.Length;
Any idea what im doing wrong?