Reversing Animation
Last updated
Last updated
In this section, we'll demonstrate how to animate a cube actor moving in the +Z direction, and then reverse the animation in the most efficient way possible.
Prepare a node tree consisting of UserTrack
, UE5
, and Sink
nodes, and activate the .
a Cube actor.
Select the UE5
node, then go to the and expand Reality Actors.
Choose the Cube actor and expand its Properties panel.
In the Transform property group, click on the button of the Relative Location
property.
Create a Cast vec3 to vec3d
node and connect its vec3d
output to the Cube.RelativeLocation
input pin of the UE5
node.
Create a new Action, optionally renaming it to something like First Animation.
Select the Cast vec3 to vec3d node, then go to the vec3 property and click on the Add Timeline button.
Right-click on the property circle, add a keyframe, move the playhead to a different timestamp, and change the Z property from 0 to 200.
Add another keyframe and change its interpolation to EaseInOut. Save the Action.
Create another Action, optionally renaming it to something like Reverse Animation.
Follow the same steps to add a timeline for the vec3
property.
Go to the First Animation action, select the second keyframe, and copy it using ^ CTRL + C
.
Rectangle select the first keyframe to move the playhead to its exact timestamp.
Switch to the Reverse Animation action and paste the copied keyframe at the beginning using ^ CTRL + V
.
Switch back to the First Animation action, select the first keyframe, and copy it.
Rectangle select the first keyframe.
Switch to the Reverse Animation action again and paste the copied keyframe as the first keyframe.
Adjust the interpolation and save the Reverse Animation form.