mirror of
https://github.com/godotengine/godot
synced 2024-10-14 11:43:32 +00:00
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.
This commit is contained in:
parent
1d47561319
commit
25ddb3dd7f
|
@ -204,7 +204,7 @@ void PostImportPluginSkeletonRestFixer::internal_process(InternalImportCategory
|
||||||
} else {
|
} else {
|
||||||
for (int j = 0; j < key_len; j++) {
|
for (int j = 0; j < key_len; j++) {
|
||||||
Basis sc = Basis().scaled(static_cast<Vector3>(anim->track_get_key_value(i, 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue