Fix #2204 Issue with armature animation rotations in glTF

This commit is contained in:
JannisX11 2024-05-29 21:29:00 +02:00
parent ecafd43f41
commit 036063ce24

View File

@ -229,8 +229,8 @@ function buildSkinnedMesh(root_group, scale) {
let bone = new THREE.Bone();
bone.name = group.name;
bone.uuid = group.mesh.uuid;
let parent_offset = THREE.fastWorldPosition(group.mesh.parent, Reusable.vec3);
THREE.fastWorldPosition(group.mesh, bone.position).sub(parent_offset);
bone.position.copy(group.mesh.position);
bone.rotation.copy(group.mesh.rotation)
if (group == root_group) {
bone.position.set(0, 0, 0);
}