Skip to content

Commit

Permalink
make sure world matrice are up to date
Browse files Browse the repository at this point in the history
  • Loading branch information
AlaricBaraou committed Sep 27, 2022
1 parent 2031ef8 commit e0a1535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/three-vrm-core/src/humanoid/VRMHumanoidRig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class VRMHumanoidRig extends VRMRig {
// Move the mass center of the VRM
if (boneName === 'hips') {
const boneWorldPosition = rigBoneNode.getWorldPosition(_boneWorldPos);
boneNode.parent!.matrixWorld.multiplyMatrices(boneNode.parent!.parent!.matrixWorld, boneNode.parent!.matrix);
boneNode.parent!.updateWorldMatrix(true, false);
const parentWorldMatrix = boneNode.parent!.matrixWorld;
const localPosition = boneWorldPosition.applyMatrix4(parentWorldMatrix.invert());
boneNode.position.copy(localPosition);
Expand Down

0 comments on commit e0a1535

Please sign in to comment.