Change animation to "stay-on-the-same-spot"

I have a character with walking animation, at the end of the animation, the character would have traveled forward some distance. How to i remove the travelling distance, while keeping the actions of the hands and legs walking.

In other words, how do i change the moving animation to a “stay-on-the-same-spot” animation, without messing with the walking gestures.

Open your animation sequence from the content browser, click the asset details tab, scroll down to the root motion section, and place a tick in enable root motion. :wink:

3 Likes

You can either turn on Root Motion where the Animation drives Velocity/Translation in the world or you could enable Force Root Lock which disables the Root Motion, the animation is in-place and you move the Pawn separately
You find the settings in your AnimSequence Asset Editor.

Hi, it’s been years since this was answered, but what should I do if I turned on the Root Motion and enabled Force Root Lock, but none of them worked, and my animation keeps moving forward? By the way, when I checked the animation, it seems the root NEVER moves, but the animation does for some reason.

3 Likes

Seems nobody knows what causes this…I have scoured the darkest corners of the net and not one question on this has ever been answered.

Bit confused. Is the animation being used in-place or root motion?

In-place is reactive as to state changes made with in the movement component of the character blueprint after the trigger event has occurred. This means it is the capsule that drives the animation and the animation BP is used to extract the current movement from the movement component.

You push W to move forward,controller picks up the movement input and is translated to the movement component. The animation blueprint casts to the movement component for the capsules movement behaviour and triggers the forward movement of the animation.

If the cycle continues but does not move forward then the current state was not cleared as the controller still thinks that W is still pressed. If the animation cycles but the capsule does not move forward then the state was not cleared in the animation BP.
Most common error is not setting the state trigger to the idle state or what ever state that says the player, and in turn, the movement component is not moving.

Root motion is event driven so anything requiring the movement component will not work and most tutorials can not be applied with any expatiation. What happens when the animation BP is told to use root motion is the capsule is glued to the “root” of your character so the requirement of always being in a state of falling as well as a base collision is still applied.

More or less the function of Velocity and Translation is tossed out the window as these abilities are already contained with it the root motion data. There other benefits as well but mostly based on theory but as far as data goes the two are unique on to themselves so using any features usually applied to in-place will in most cases result in a conflict between the two.

Basically how root motion works is you tie in a trigger directly into the animation take. You tell UE4 that the animation take is RM and the animation will tell it that root motion is being used. You can then poll the input table to see if W is being presses and if so, tied in to move forward, your character will move forward base on the time base use in the root. As long as you hold W your character will continue to move forward based on the last know XYZ location of the root joint and will continue to cycle from that point.

Of course I’m guessing but based on expected behaviour I’m going to assume that a state was not cleared or at least the current state is reset to idle if the player is not moving.

Better than no answer me guesses

Thanks for the thorough post, my personal issue is that when I Enable ‘Force Root Lock’ the Animation doesn’t stop moving, instead it moves strangely. For example if I enable it, a 90 degree Left Turn animation will turn into a 180 degree Left Turn Animation. It seems that this program I’m using called iClone 8 is actually rotating the root -90 degrees over the animation while rotating the pelvis +180 degrees over the animation…so what I get is what appears to be a +90 degree turn to the left, so when I lock the root the root is no longer countering that 180 degrees…and so it is now turning 180 degrees…

Turns out it’s not an issue with Unreal Engine that’s causing this but with the way iClone 8 is Retargeting Root Motion Animations, specifically in my case the Turn In Place animations from ALS

Hi guys, don’t know if this can help but I’m using an IK retargeter in UE5.3 version. here is how I fixed the problem (if using an IK retargeter) :

  1. Open your IK_RETARGETER file
  2. Select the root of your target in the “Chain Mapping” tab
  3. Go to the “Details” Pannel
  4. Select the “translation mode” under “FK”
  5. Set it to Globally Scaled
  6. hit Save :slight_smile:

Now you should be able to go to your animation and set the “root motion” of your animation to “Force Root Lock”