How to setup humanoid animations with locked root motion

Hi,

I have character animations where player moves physically in 3d space.
I have to lock root motion, because position of the player should be controller by the code instead. I found option in the import settings, under Root Motion>Enable RootMotion (it actually should say disable root motion?!) After that, all character’s animations are good, they are in one place.
However, visual problem appears - legs are moving to the root bone which is up where the hip bone is. This means that even in the idle character legs will be in the air at some points.

In Unity there are many options, and one of them allows to freeze leg position to the ground while root bone translations is still locked, and also - everything looks just fine.

Is there such option in Unreal? If not how people get around this issue?
Is there a Humanoid concept that helps with these issues?

What program are you importing the animations from?

@OORTIZ
Maya or 3ds Max. It is FBX file.

Sorry, Blender guy. I won’t be very helpful I’d mostly just be helpful for importing from there and animation things before it hits Unreal. I mean if I were you I would just fix the animation itself. I haven’t done it personally but you can fix your animations in Unreal, if you don’t wanna take it back to your 3d engine.

Here a nice video that talks about animation in Unreal

Just my opinion though, I’m sure someone here probably knows exactly what you want.

The option you are looking for is not “enable root motion”. It’s not wrongly named, it does exactly that, extract the root motion so it can be applied on the character. That leaves the root in place.
What you want I guess is “force root lock”, that locks the root as specified, but doesn’t exctract the rootmotion for gameplay use.
Visually these have a similar result in the animation editor, but that’s kind of deceiving.

And regarding the feet-wobble issue, it’s hard to say at it could come from a few different places. You could check the skeletons retargeting settings and if they are what you need for example, or maybe the compression settings, etc.

If that doesn’t work though and you want to force-lock the feet in place though you’d have to put in a bit of effort and create a setup for example in a post process animation blueprint, using some leg-IK nodes. But this can be highly dependent on your workflow and skeleton/mesh setup, so I can’t really be a lot more specific.
A bit more detail on post process animation blueprints can be found here: Animation Blueprints | Unreal Engine Documentation

Force Root Lock helped for me. If you have many assets in your blend space, select them all, and use this python script:


import unreal

# Get the selected assets in the Content Browser
selected_assets = unreal.EditorUtilityLibrary.get_selected_assets()

# Iterate over each selected asset
for asset in selected_assets:
    # Check if the asset is an Animation Sequence
    if isinstance(asset, unreal.AnimSequence):
        # Set the "Force Root Lock" property to true
        asset.set_editor_property("force_root_lock", True)

print("Force Root Lock set to true for selected Animation Sequence assets.")

This will enable Force Root Lock on all the selected animation assets.

Alternatively you should be able to do this via the property matrix as well, no direct need for python.