0
Answered

Pause During rewind

Jack Kheir 11 months ago updated by Lazlo Bonin (Lead Developer) 3 months ago 3
Hi, 

I am trying to pause during a rewind but every time I pause and then rewind again it snaps the object I am rewinding back to where it started rewinding from, is that common?

Also, initially I wanted to scrub through a sequence where an AI carries outs tasks , fast forward and rewind but I realised I cannot fast forward just accelerate is that right?

Thanks,
Jack
Chronos Version:
Unity Version:
Answered

Hi Jack!

What do you do to pause the timeline exactly? Is your object an animator? If so, then you may be running into this limitation.

Also, scrubbing is not possible. As indicated on this pageChronos is not a replay plugin. It only manipulates time continuously.

Therefore, it cannot:

  • Scrub to a specific point in previous recorded data
  • Replay rewind data in a forward direction
  • Export or import rewind data to file

I have the same issue.

// Rewind

rootClock.localTimeScale = -2;

// Pause while rewinding

rootClock.localTimeScale = 0f;

// Then after a while

rootClock.localTimeScale = -2;

Clock time flows as intended, but the the player snaps backs to the position where it were when the rewind started. The player object has a animator, and Timeline with record duration greater than the time when rewind started.

Hi Gayanw, Jack,

Sorry for the extremely late reply on this.

This is "by-design". On rigidbodies, Chronos keeps an internal "zero-snapshot" that it:

  • Saves when the time scale reaches zero
  • Applies when the time scale goes away from zero

This is required for the velocities, drags, and other measurements to stay consistent. 

If your object moves while paused, you will notice this jump, unfortunately.

You can disable the zero snapshot behaviour in RigidbodyTimeline.cs, specifically between lines 57 and 67. At present, I won't make this change to the core source, because it might break existing behaviour in other projects. I hope this helps!