11-22-2019, 03:52 PM
(11-22-2019, 03:13 PM)_Aka_ Wrote: Hi
From reading your message, I don't see anything wrong in your steps, so I will need to test your project to find ou what is wrong. I will do that on Monday or Tuesday. I will keep you updated.
The issue appears only for one frame or does it stay for all the duration?
For the duration. So the following code I call ApplyDeltaTime(2); in the Start() function after instantiation but it starts at position 0, where i would have expected it to be progressed by 2 seconds into the path. Note that it works as expected if I then call ApplyDeltaTime(2); in the update function upon pressing a key, you can see the object progressed each time pressing the key(though i didn't add that code in the sample).
Code:
SplineController controllerPrefabInstance = GameObject.Instantiate<SplineController>(controllerPrefab);
controllerPrefabInstance.name = "ControllerDelta2";
controllerPrefabInstance.Spline = mainspline;
controllerPrefabInstance.ApplyDeltaTime(2);