🏓Physics Update

This feature is available in Timeflow 1.9.0 or later.

Timeflow now supports simulating physics while in edit mode and play mode. This allows Rigidbody states to be captured in their initial position, automatically resetting object transforms on rewind, and then simulating all physics interactions when Timeflow is played.

Save Initial States

Click the button Save Initial States to find all the Rigidbody objects in the scene and capture their current transform. This records the current position, rotation, and scale of all objects, which can then be restored to reset all objects to their original positions.

When states are stored, a green badge is displayed: States Saved

Save On Awake

Enable this option if you want the initial states to be recaptured upon this game object awaking (usually scene load). This is generally not needed when the initial states are already saved into the scene, however in some cases it may be desirable to capture states as they are rather than from a pre-saved state.

See the source code of PhysicsUpdate.cs for the public methods SaveInitialStates, RestoreInitialStates, etc. which can be called from events or custom scripts.

Restore

Click this button to reset all Rigidbody objects in the list to their stored initial states.

To exclude any objects from being restored, uncheck the checkbox next to the Rigidbody in the list.

Clear

Removes all stored initial states.

Restore On Enable

If enabled, the initial states are restored each time the component (or game object) become active in the scene. This mode can be useful to control restoring states using an object track.

Restore On Rewind

This option triggers the initial states to be restored when the Timeflow timeline rewinds back to the start.

Time Threshold

This works in conjunction with Restore On Rewind. It will only restore initial states if the timeline is rewound to before the time threshold value. This prevents restoring states when jumping to other times, other than the start.

Initial States List

This displays all Rigidbody objects found in the scene, captured by pressing the Save Initial States button. Turn off the checkbox for any items you do not want to be restored. For example,

Show Values

Enable Show Values to directly edit the stored states. Expand or collapse the foldouts as needed.

Last updated