How to perfectly align animation Root Motion with the MoverComponent's trajectory?

I am currently working on game animation assets and looking to implement a Motion Matching system similar to the Game Animation Sample (GAS).

However, I’ve run into an issue. Since our animations are mocap-based, it is very difficult to get the Root Motion translation/trajectory to align with the MoverComponent’s movement trajectory. This is resulting in poor Motion Matching quality (e.g., foot sliding).

I looked at the Start, Stop, and Turn180 animations in the Game Animation Sample, and I was amazed by how perfectly the animation’s Root Motion speed matches the MoverComponent’s velocity trajectory.

For example, Turn_18​0 animsequence:

[Image Removed]

Since our team doesn’t have much experience on the animation production side, we have two questions:

1. How is this exact synchronization achieved? How can we author or process our animations so that the Root Motion translation perfectly matches the MoverComponent’s movement trajectory?

2. What is an acceptable margin of error? When using Motion Matching, does the animation data need to be a 1:1 perfect match with the movement data? We will constantly be tweaking our movement parameters (acceleration, max speed, friction, etc.) to improve the “game feel.” When discrepancies between the animation and the actual capsule movement inevitably occur, what is considered a reasonable or acceptable range of error before the visual quality breaks down?

[Attachment Removed]

Hey there,

Yes, generally speaking, the Game Animation Sample uses a workflow where the capsule’s simulation is exported and followed really tightly. This is the recommended approach, and we believe it brings out some of the best-feeling gameplay results.

1. How is this exact synchronization achieved?

Our workflow is:

  1. Build out your movement model on the capsule. Tune all of the settings and get the feeling you want on the capsule with either no animation or placeholder animation in place.
  2. Use the rewind debugger to record gameplay motion on the controls that you want your character to perform.
  3. Export the trajectory using the export trajectory feature (usually a button on the right-hand side of the toolbar of the rewind debugger)
  4. Animate your root to that trajectory for that move.

2. What is an acceptable margin of error?

This is hard to answer because it depends on your dataset and tuning. I will say, you can deviate only a little bit. It doesn’t need to be a perfect match, but trajectory will play a large part in selection. Because trajectory is usually a measure of velocity and the vector of the root bone, if your capsule or root motion is changing erratically, then your behaviour might choose a pivot or turn when running straight. In general, we would recommend smoothing it out a bit, and the closer it is, the better.

Dustin

[Attachment Removed]

Thank you Dustin, we will try and make some animsequence samples.

[Attachment Removed]