mirror of
https://github.com/JannisX11/blockbench.git
synced 2025-02-17 16:20:13 +08:00
Fix #2204 Issue with armature animation rotations in glTF
This commit is contained in:
parent
ecafd43f41
commit
036063ce24
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user