Sequences don't play correctly after calling SetPlaybackPosition


I’ve been trying to solve this one for some quite time. When I play sequence for the first time everything works fine. Than I call SetPlaybackPosition to frame 0, in order to reset the sequence. This still works correctly. But when I call Play the second time, the sequence plays, but all the transforms are weirdly squished and it “automatically resets” when it’s finished. It looks like every time I call the SetPlaybackPosition the transforms get scaled down by a half. I don’t know how to better describe it, so here’s a [video][1]. I’ve also tried to reproduce this in the new preview of UE5 and it’s still there.

This is the Blueprint setup I’m using:

edit: The issue is seemingly fixed in Ue4.27.

I don’t have a concrete solution for you, but I hope I can provide enough context to justify this as an answer.

Reproducing the issue

First of all, I can confirm that this is an issue, and that it is only happening in UE4.26. The problem is completely absent in UE4.25. I believe this is caused by the architectural refactor of the LevelSequencer in 4.26.

The symptoms are as you described: Every time SetPlaybackPosition is called, the transform values of the actor are divided by two. You can test this with a setup like so:

Pressing v many times to “undo” the level-sequence will cause the sequence to be shrunk to 1/2, then 1/4, then 1/8, until it hardly moves at all when played.

My resolution:

From my testing, the issue was directly caused by destroying/recreating the SequencePlayer. When I adjusted my test-case to create a single SequencePlayer on BeginPlay, and then use it with Play/SetPlaybackPosition, I no longer had this issue.

I know this doesn’t fully match your test-case, but potentially it gives you a hint about how to safely use SetPlaybackPosition?

Guesses at the cause:

From the article linked above:

In the new framework, a transform entity will be created when this track is resolved against its object along with pointers to the composite float channels; floats for the evaluated result of each channel; a function pointer to “USceneComponent::SetRelativeTransform”; and a tag signifying the entity is a transform property.

I think that this transform entity may be the cause of the squishing? At least when destroying the player, I can accept that some important context or data is lost, that causes subsequent players to be wrong.

The unfortunate thing is all legacy methods were deprecetated, and rewritten to call SetplaybackPosition, so there is no other way to scrub.

Best of luck!

Hi, thank you Liam for your investigation. At the end I’ve managed to find a workaround for this. It requires modifying the engine code, and I’m calling it a workaround, because I’m not sure that it’s a correct solution. But it fixes this issue, and it doesn’t seem to have any unwanted side effects, so I’ll post it here if anyone’s interested:

Edit the “MovieSceneSequencePlayer.cpp” file, and in the “SetPlaybackPosition” function add following code after “TimeController->Reset(GetCurrentTime());”:

if (RootTemplateInstance.IsValid())

So the change should look like this:

This is seemingly been fixed in Ue4.27, by the way.

I’ve done some testing in the 4.27, and it seem to work correctly but ONLY if you destroy the sequence player after the sequence is finished and after you set the playback position. If you don’t do that, it still bugs out, but at least now you just need to clean up after yourself and destroy the players instead of modify the engine code. Thanks for letting me know.

Hi, I’ve circled back on this issue in 4.27.2, and the issue is persisting for me.

SetPlaybackPosition is breaking transformations, and even destroying the Player/Actor doesn’t seem to work for me:


Any ideas?

Ran into this issue. Is it still in the Engine after all these updates?