diff options
author | Lyuma <xn.lyuma@gmail.com> | 2024-05-16 02:37:59 -0700 |
---|---|---|
committer | Lyuma <xn.lyuma@gmail.com> | 2024-05-16 02:45:42 -0700 |
commit | 25ddb3dd7f05232d950ae5e986d8c6c006d19abf (patch) | |
tree | 0c98ac22ece460612ac1b19c3cf66bc205c0cc95 | |
parent | 1d47561319938e10cb53d202ceaeca102511a31e (diff) | |
download | redot-engine-25ddb3dd7f05232d950ae5e986d8c6c006d19abf.tar.gz |
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.
-rw-r--r-- | editor/import/3d/post_import_plugin_skeleton_rest_fixer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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 3eabe46950..b69d38afa0 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<Vector3>(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()); } } } |