Level Sequence Always Restore States

Hi there,
I’m using a level sequence in my project and it always snaps back on sequence end, no matter I set “restore state” to true or false.

Step to reproduce:

  1. Create a clean project
  2. Drag a cube actor into level
  3. Add a level sequence with some simple location update

  1. Play in level BP

The “Restore State” is set to false and the playback position may stay at the end of sequence, however those actors in level will always snap back to their original positions.

You will actually need to set the “When Finished” property on each of the sections. Note, however, there is a bug in the Animation track where it snaps to the default pose instead of keeping the pose if you set it to “Keep State”. This has been fixed in 4.17, so you might want to try out the 4.17 preview release, which is out now.

202335-sequencer_whenfinished.jpg

Hi Max - I’m seeing this same issue as the original issue which isn’t resolved with your solution. We’re not using an animation, only a simple Location|Transform track. Is there an option to “Keep State” for the Transform track?

Hi Max - Thanks for posting this solution. Do you happen to know if the fix in 4.17 is isolated to a particular set of change lists in P4 that we could integrate into our local copy 4.16. Our level designers are hitting this issue. If the change was relatively isolated we’d love to grab it if possible.

Unfortunately, the change comes along with a bunch of other changes to enable general track blending in 4.17.

However, you might be able to add this one line which should expose that property and might be sufficient. Look at MovieSceneSkeletalAnimationSection.cpp

In the constructor, add this:

EvalOptions.EnableAndSetCompletionMode(EMovieSceneCompletionMode::RestoreState);

Are you on 4.16? If you are, that option should be exposed for transform tracks.

@dbulla took me a minute to find this too. just right click anywhere in section where your track keys are located (but not on a key). the options will appear for keep/restore state

As of UE4.19, default can be set with in DefaultEngine.ini (or maybe another .ini) [/Script/LevelSequence.LevelSequence] DefaultCompletionMode. Once I confirm this I’ll post the full answer here or in duplicate How can I stop a Level Sequence from resetting at the end ? - Cinematics & Media - Epic Developer Community Forums

I answered it here. But you need to split the blueprint sequence player settings and set the option in there

I tested huulong’s solution in 4.21 to change the default to Keep State, and it works.

Add this to DefaultEngine.ini:

[/Script/LevelSequence.LevelSequence]
DefaultCompletionMode=KeepState