Reversing Animation
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.
Process
Prepare a node tree consisting of
UserTrack,UE5, andSinknodes, and activate the APM.Spawn a Cube actor.
Select the
UE5node, then go to the Node Details Panel and expand Reality Actors.Choose the Cube actor and expand its Properties panel.
In the Transform property group, click on the Pin Switch button of the
Relative Locationproperty.
Create a
Cast vec3 to vec3dnode and connect itsvec3doutput to theCube.RelativeLocationinput pin of theUE5node.
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
vec3property.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.

