Page 1 of 1

Root Motion

Posted: Sun Nov 05, 2023 4:35 pm
by ats
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 :(

Re: Root Motion

Posted: Tue Nov 07, 2023 5:23 pm
by Tomcat
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.