From c1a29f5ef4c43c6b1ba6afa5361f197fa8e39ad2 Mon Sep 17 00:00:00 2001 From: Silc Renew Date: Thu, 1 Dec 2022 11:11:21 +0900 Subject: [PATCH] Remove unneeded calc in root motion --- scene/animation/animation_tree.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/animation/animation_tree.cpp b/scene/animation/animation_tree.cpp index 724670cfd7b..3e0f59a48a8 100644 --- a/scene/animation/animation_tree.cpp +++ b/scene/animation/animation_tree.cpp @@ -1630,7 +1630,7 @@ void AnimationTree::_process_graph(double p_delta) { TrackCacheTransform *t = static_cast(track); if (t->root_motion) { - root_motion_position = root_motion_rotation.xform_inv(t->loc); + root_motion_position = t->loc; root_motion_rotation = t->rot; root_motion_scale = t->scale - Vector3(1, 1, 1);