Hi all. I have a Spline setup, as well as a Timeline which makes us move along said spline.
The spline has several sections where the speed needs to go down and go back up. For the moment I have achieved this using Set Play Rate, however this makes the calculations a little time consuming. Essentially, I would like to achieve the following:
We need to travel along the spline for 80 seconds in total. From start to checkpoint 1 we need to travel 25 secs. From Check point 1 to check point 2, 30 secs and then 25 secs.
With the Set Play Rate it works, but I have to perform tens of tests, in order to configure the correct play rates, at the desired sections.
The timeline goes from 0 to 1. Also this is done for multiple splines, each with different times to complete the movement.
Is it possible (and if yes, how) to tell the timeline to move with speed X for the first 25 secs, then move with speed Y the next 30 and finally go back to speed X, for the final 25 seconds?
I know how to calculate the speed, using Time and Distance, but I don’t know how to implement it into the timeline.
Here is a snippet of how I have the setup currently
I am trying to test out your suggestion now, but I do not know how to apply the Move Speed to the character(In this case just a Cube, for the sake of testing) which is moving along the spline. This specific event is what eludes me.
It’s all somewhat cryptic because I couldn’t see how you’re actually applying movement - the screenshot does not show it. So here’s what I had in mind:
I’m moving 2 static meshes along a spline using the same Timeline:
Hard to tell if the above is applicable or even useful. It was just an idea that may be worth exploring but may not work well or become cumbersome to handle / maintain depending on what else is needed.
Thanks for the further example. My apologies, I should have shown an example, earlier. I’ll post one bellow.
You have the right idea, it is just one object on the spline which will slow down, for example, at rear point. where the green object is.
To be precise here’s an example of what I am doing.
I have a spline which is 5000 units long. I start moving from the beginning(no input from he player, everything happens automatically). At 1000 units, I slow down and move at a lower speed for the next 1000 units. After that I go back to my normal speed.
Now, the first 1000 units need to be covered in 25 seconds. The second 1000 units need to be covered in 30 seconds and then the final portion to be covered in 25 seconds.
At the moment, I am experimenting with another option, Set Custom Time Dilation. It only affects actors, but the player is an actor, so it’s all good.
I believe I have found a solution. The timeline will have Two Flow Tracks. The first flow track will be from 0 to 1 and it will be used for the movement. It will be called Base
The Second Track will affect the speed and based on the time in seconds, it will fluctuate from 0 to 1 to 0. It will be called Speed.
After that, at the moment where I modify the Play Rate(which also affects the speed), the “Target” will be 1 multiplied by the Speed track. By Target, I am referring to the connection, in the Yellow square(Finterp to function), in my example above.
Essentially, this way we tell the Timeline to slow down and speed up at the exact time we need. However there are still some issues as to where on the Spline this happens. I’m still working on that one.
I hope the explanation makes sense. I’ll provide an example once it is fleshed out.
I’ve been thinking about it but couldn’t arrive at a clean solution that did not include some kind of hackaround. Would be cool if you shared how you pulled it off once it’s working as intended.
Sadly we had to go with the Set Play Rate route, because the option I mentioned above cause issues. Mainly that the second caused us to also go back along the spline, aside from the slow down. And we do no have the needed time, to do this the way I wanted to.
In any case, thank you for the help. If I get the time, I will get back to this and let you know if I find a proper solution.
Hi! So what we did to resolve this, is use a Sequencer. We created a the spline and then added it to a sequencer. That way we tell the sequencer how long we wish to fly from point to point and it follows the spline path.