Play spline animated object in editor rather than on beginPlay?

Hey guys!

Trying to make a subway train animating on a spline. Followed this tutorial and managed to get my train carts to follow my spline perfectly.

However as the tutorial shows, this only happens when you click the Play button. I want it to constantly play in the editor with an option to pause anytime I want.
Essentially I am rendering a cinematic from UE4 through Sequencer. Is there a way to animate it manually using spline?

Thanks!

Cheers

indy

You can animate an object along a spline in Sequencer by choosing +Track->Path->and then your spline. For timing, you can animate the 0-1 value along the path of the spline. That will preview in editor and will play in game when you play your sequence. Not sure if that’s what you’re after.

… real-time in editor is though, mostly because BPs don’t have an on-tick event running unless you hit the play button.

On construction script fires when you move/change stuff, but that won’t really get you anywhere either with continously playing a “game” thing in editor.
you can try a recursive function, but I bet you’ll get the editor to crash if it even let’s you… (start an event. Call the even again at the end of the event).

Afaik the only thing that can continously play in editor with real-time enabled is materials.
Unless there is some obscure/hidden function I’m not aware of to achieve this.

Probably not what you’re asking for, but if you want something in the context of Sequencer that fires every frame when you hit Sequencer’s play button, you can create an event repeater and call a blueprint function in editor by enabling the “Call in Editor” property on that function. Here’s the docs on that: Cinematic Event Track in Unreal Engine | Unreal Engine 5.1 Documentation

Sounds good thanks! :slight_smile: