- Add Mesh Space Rotation Blend to AnimationTree Blend2 · Issue #7579 · godotengine/godot-proposals · GitHub
- Mixing two animations with bone filters for upper / lower body of armature
- Animation Blending not usable due to weird rotations. Blendtree / Blendspace · Issue #106623 · godotengine/godot · GitHub
- Skeleton3D: Unable to stop child bones inheriting parent bone rotations
- Bone rotates "the wrong way" during animation transition interpolation. · Issue #107027 · godotengine/godot · GitHub
Using mixamo-style skeleton.
Using a blendtree. Just to show it work with blendtree
Blend filter:
Problem: When aiming the children follow rotation of parent, impossible to have proper aim offset like in Unreal Engine.
The fix: Cancel pelvis rotation by rotating spline_01
Do this in process, after the blendtree is processed.
func _process(delta: float) -> void:
if controller.state == "aim":
var pelvis_global_rot = skeleton.get_bone_global_pose(pelvis_idx).basis.get_rotation_quaternion()
skeleton.set_bone_pose_rotation(spine_01_idx, pelvis_global_rot.inverse())
Result: Now Upper body always face forward.
Fine tune: Add offset (previous image the player aim too much on the left, because of other bones rotations)
func _process(delta: float) -> void:
if controller.state == "aim":
var pelvis_global_rot = skeleton.get_bone_global_pose(pelvis_idx).basis.get_rotation_quaternion()
var offset_rot = Quaternion(Vector3.UP, deg_to_rad(-20.0))
skeleton.set_bone_pose_rotation(spine_01_idx, pelvis_global_rot.inverse() * offset_rot)





