Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Play() does not cause SplineController to produce expected behaviour
#5
Hi,

I fixed the issue by modifying your CubeController so that the call to CubeMovement.BeginMovement is delayed to after the SplineController's initialization is finised. You can find a modified version of your CubeController attached to this post.

Explanation of the issue:
In your original code, BeginMovement was called directly after Instantiate(cube), before Unity automatically calls the SplineController's Start() method, which happens later that frame. BeginMovement would set the SplineControlle's state to "Playing", indirectly by calling Play(), but the initialization done in Start() would initialize the state to Stopped, which lead to the undesired behaviour.

I hope this helped.

If and when you feel like it, please leave a review for the asset, that helps a lot.
Have a nice day.


Attached Files
.cs   CubeController.cs (Size: 708 bytes / Downloads: 1)
Available for freelance work, feel free to reach out: toolbuddy.net
Please consider leaving a review for Curvy, this helps immensely. Thank you.
Reply


Messages In This Thread
RE: Play() does not cause SplineController to produce expected behaviour - by _Aka_ - 02-04-2026, 10:29 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  SplineController Ignores Follow-Up and Chooses Wrong Spline Josenildo 7 3,879 07-29-2025, 09:15 PM
Last Post: _Aka_
  Additional offset to Follow behaviour Ayyappa 3 1,869 04-30-2024, 01:35 PM
Last Post: _Aka_
  Support for "Fast Enter Play Mode" via "No Domain Reload" XtroTheArctic 5 3,162 11-27-2023, 12:03 PM
Last Post: _Aka_
  ScanConnections() causes heavy load in play mode, even with all Curvy objects removed bennett 6 3,673 04-10-2023, 10:18 PM
Last Post: _Aka_

Forum Jump: