Root Motion

Post any engine-related development questions or issues you are having to receive advice, support, or help.
Post Reply
ats
Posts: 1
Joined: Sun Nov 05, 2023 4:21 pm

Hi All!

I would appreciate some help with the root motion because this is something I'm really struggling with. After a lot of trails and errors, I was able to import Synty character to Mixamo, use auto-rig then import it to Blender and merge all animations with Godot Game Tools - GGT addon. I exported the character to gltf and imported it in Godot. So far so good. When I play animations with Animation Player they look good and very smooth:



However, when I add Animation Tree and set it to track "Hips" bone where the motion is the animations don't look good nor smooth, they're shaky:



It also looks the same "in-game" when I try to move the character with simple code from Godot docs:

Code: Select all

extends CharacterBody3D


@onready var animation_tree = $AnimationTree

var current_rotation: Quaternion

func _physics_process(delta):
	# Add the gravity.
	current_rotation = get_quaternion()
	var velocity: Vector3 = current_rotation * animation_tree.get_root_motion_position() / delta
	set_velocity(velocity)
	move_and_slide()
Moreover animations with more sophisticated rotation don't work at all :(
User avatar
Tomcat
Posts: 52
Joined: Tue Jul 18, 2023 6:51 pm
Location: Moscow (Orcish Stan), The Aggressive Evil Empire
Contact:

ats wrote: Sun Nov 05, 2023 4:35 pmHowever, when I add Animation Tree and set it to track "Hips" bone where the motion is the animations don't look good nor smooth, they're shaky:
You have the camera following the hip. And it's shaky, relative to the overall body position.
— Who's your enemy?
— The whole world.
— Who's your friend?
— The cat.
Post Reply