Root motion broken?

Godot Version

4.5.1 stable

Question

Why is the root motion rotation not rotating based on root rotation?

In the import tab the animation looks correct, but when i trigger it, it rotates along the Z axis and not along the y axis?

How do i fix this?

func _physics_process(delta) -> void:
    	velocity = get_quaternion() * anim_player.get_root_motion_position() / delta
		set_quaternion(get_quaternion() * anim_player.get_root_motion_rotation())

THanks to this its now working.

All you need is to retarget skeleten to a new skeleton bonemap profile and select your root bone.

I had a similar issue and it usually comes down to the import settings. Make sure you’ve actually assigned a ‘Root Bone’ in the Import tab of your model (under the Retarget section). If Godot doesn’t know which bone is the root, get_root_motion_position() just returns zeros. Once you set it there and re-import, it usually snaps right into place.

Problems was that documentation didnt specify that you have to retarget skeleon after import. Root bone was set in the root motion tab. And for forward movement it was working, but rotation didnt work until you retargeted skeleton and made a new bonemap.