From a5384365a4349bf1b90bfb7e7322d3e7c5c87923 Mon Sep 17 00:00:00 2001 From: ayanchavand Date: Tue, 2 Jul 2024 13:02:11 +0530 Subject: [PATCH] Fix: AnimationMixer Example Code --- doc/classes/AnimationMixer.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/AnimationMixer.xml b/doc/classes/AnimationMixer.xml index c635eba2abbc..2fd3a4587502 100644 --- a/doc/classes/AnimationMixer.xml +++ b/doc/classes/AnimationMixer.xml @@ -182,10 +182,10 @@ func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") - var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_Quaternion_accumulator() + var current_root_motion_rotation_accumulator: Quaternion = animation_tree.get_root_motion_rotation_accumulator() var difference: Quaternion = prev_root_motion_rotation_accumulator.inverse() * current_root_motion_rotation_accumulator prev_root_motion_rotation_accumulator = current_root_motion_rotation_accumulator - transform.basis *= difference + transform.basis *= Basis(difference) [/gdscript] [/codeblocks] However, if the animation loops, an unintended discrete change may occur, so this is only useful for some simple use cases.