Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SplineController Delta after instantiate(Bug?)
#1
Hi,

I have a Spline setup in my scene and i want to create objects at runtime that follow the spline. I'm using objects with a spline controller. these are then setup as prefabs. when i instantiate them i want to then apply an offset so they are staggered along the spline so after instantiate i want to call ApplyDeltaTime() on the controller with random values.

Problem is when calling ApplyDeltaTime() with a random value on the newly instantiated spline controller the position remains 0 on the spline so all objects are at the same position along the spline.

I suspect this is a bug and something hasn't initialised on the spline controller. or reinitialise after setting position.

Question is, is there a way around this? 

In the sample project i have  a sline and two controllers in scene and a prefab in assets with a controller. One controller in the scene is left at delta 0 which starts at the beginning and one delta 5. in the script the delta 5 is reference by the script and apply delta called passing in 5. this works and moves the object to delta 5, then the prefab is instantiated calling delta with 2 so this should result in three cubes moving along the spline staggered along the spline but the instantiated object remains at delta 0 start position.
Reply


Messages In This Thread
SplineController Delta after instantiate(Bug?) - by Marc Mitchell - 11-22-2019, 10:46 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Play() does not cause SplineController to produce expected behaviour ConCat 8 1,388 02-08-2026, 11:54 AM
Last Post: _Aka_
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 4,466 07-29-2025, 09:15 PM
Last Post: _Aka_
Wink In SplineController OnPositionReachedList Event is missing shimizu 2 1,814 02-07-2022, 12:47 PM
Last Post: shimizu
  best way to rotate, change offset, and inset position of splinecontroller object smackledorf 1 1,731 01-17-2022, 01:39 PM
Last Post: _Aka_

Forum Jump: