Sequencer Audio/Platform clock: Pausing game delays all later sequence playback

Summary

With Clock Source set to Audio or Platform, any game pause permanently delays every later Sequencer playback by the total time paused. Confirmed with a Level Sequence Player and an Actor Sequence Component. The Tick clock is not affected.

Engine version: 5.8.3 (CL 58210709), Windows 11, PIE and Game
Area: Runtime / MovieScene / FMovieSceneTimeController_ExternalClock

Root cause: In MovieSceneTimeController.cpp, FMovieSceneTimeController_ExternalClock::OnRequestCurrentTime, PausedTime is the world’s total paused time since it started, but UndilatedDeltaTime only counts from OnStartPlaying. So pauses from before the current playback are subtracted too. In reverse, the result End - elapsed - PausedTime jumps past the start right away.

Suggested fix: Record PausedTime in OnStartPlaying, subtract only PausedTimeNow - PausedTimeAtStart, and reset it in OnStopPlaying.

Workaround: Use the Tick clock, or set Sequencer.AllowPausedClock 0.

What Type of Bug are you experiencing?

Animation

Steps to Reproduce

  1. Create a Level Sequence with a short animation (e.g. a 1-second transform track) and set Clock Source to Audio.
  2. In PIE, play it with a Level Sequence Player. It plays correctly.
  3. Pause the game for 10 seconds (SetGamePaused), then unpause.
  4. Play it again, then Play Reverse.

Expected Result

Both the forward and the reverse playback start right away at normal speed.

Observed Result

Forward playback starts about 10 seconds late. Reverse playback finishes in one frame. Each further pause adds to the delay.

Affects Versions

5.8

Platform(s)

Windows

2 Likes