From 25ddb3dd7f05232d950ae5e986d8c6c006d19abf Mon Sep 17 00:00:00 2001 From: Lyuma Date: Thu, 16 May 2024 02:37:59 -0700 Subject: [PATCH] rest fixer: Apply orthonormalized scale to anims Adjust the logic for position and scale animation tracks in the Apply Node Transforms case To match how we adjust bone pose/rest, use basis.orthonormalized() for parentless bones. --- editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp b/editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp index 3eabe46950d..b69d38afa06 100644 --- a/editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp +++ b/editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp @@ -204,7 +204,7 @@ void PostImportPluginSkeletonRestFixer::internal_process(InternalImportCategory } else { for (int j = 0; j < key_len; j++) { Basis sc = Basis().scaled(static_cast(anim->track_get_key_value(i, j))); - anim->track_set_key_value(i, j, (global_transform.basis * sc).get_scale()); + anim->track_set_key_value(i, j, (global_transform.orthonormalized().basis * sc).get_scale()); } } }