Posts: 32
Threads: 15
Joined: May 2020
Hi again,
I'm using the default SplineController to move an object. I have multiple splines joined with connections. The object slows down as it approaches each connection then speeds up again after continuing to the next spline.
I'm wondering how do I change this behaviour so the speed through connections remains constant?
many thanks
John
Posts: 2,191
Threads: 99
Joined: Jun 2017
Hi,
A similar question to yours was asked on the forum, and here is my answer
https://forum.curvyeditor.com/thread-893...ml#pid3440
Have a nice day
Posts: 32
Threads: 15
Joined: May 2020
Ah makes sense, thank you.
I'm not 100% clear though, once I have calculated what the speed should be according to those links, would I set the SplineController speed in my Custom Selector script once I have determined which spline is next? Is that the correct place to change the speed?
Posts: 2,191
Threads: 99
Joined: Jun 2017
I would personally have put the speed change in the event handler of the OnEndReached or the OnControlPointReached events, but I see no argument to oppose the idea of putting it in the Custom Selector script, besides it not being good design (a selector should select and nothing more).
Posts: 32
Threads: 15
Joined: May 2020
Thank you again for your help, very much appreciated.
John
Posts: 2,191
Threads: 99
Joined: Jun 2017
You are welcome. If and when you feel like it, please leave a review for the asset, that helps a lot.