I have just started experimenting with root motion in Unreal Engine, and I have faced a problem: Both Turn In Place and Idle animations have root motion enabled, and they are in separate states connected to each other in the state machine. From the Idle to Turn In Place animation state, the character turns 180 degrees using the Turn In Place animation, and when it transitions to the Idle state, it rotates back to whatever rotation the character had in the Idle animation.
Is there a setting that could help me keep root motion enabled for both animations while making Idle preserve the rotation that the Turn In Place animation had when it transitioned to Idle?
There is a Root Motion Root Lock setting that has three different options, but I’m not experienced with those.
The snap back usually means the root motion only plays on the mesh and never reaches the capsule. Check three things. In the Anim Blueprint Class Defaults, set Root Motion Mode to Root Motion from Everything; the default only applies root motion from montages, so state machine animations turn the mesh and then reset. Keep Root Motion Root Lock on Ref Pose. On the character, turn off Use Controller Rotation Yaw and Orient Rotation to Movement while turning, or they overwrite the rotation the animation just applied.
I was able to fix this problem; my root motion constraint in the animation was not following the rotations.
I tried implementing motion matching.
I finished making 8 start-to-walk animations with 8 walk loop animations for 8 directions and 1 idle animation. I tried motion matching for the first time; I followed some well-known tutorials for motion matching and ended up with this. It sees the directions correctly, but it is stuck—it plays a few frames of the animations over and over again. I don’t know how to debug this. The default “Continuing Pose Cost Bias” was set to “-0.01”. I tried “-0.5”; some minimal changes happened, but the problem persists.
Edit: Just used the Rewind Debugger tool and noticed it doesn’t play walk loop animations at all; it is stuck at playing the start-to-walk animations only.
Unreal engine:
Example of how it looks (in the animation software) from idle to start-to-walk to walk loop: