Skip to content

Commit 83108fa

Browse files
author
Avaer Kazmer
committed
Rig prerotations cleanup
1 parent 179c6ef commit 83108fa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

vrarmik/Rig.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -278,12 +278,14 @@ class Rig {
278278
preRotations.Hips.premultiply(new Quaternion().setFromAxisAngle(new Vector3(1, 0, 0), -Math.PI/2));
279279
}
280280
if (!flipZ) {
281-
preRotations.Left_arm.premultiply(new Quaternion().setFromAxisAngle(new Vector3(0, 0, 1), Math.PI*0.25).inverse());
282-
preRotations.Right_arm.premultiply(new Quaternion().setFromAxisAngle(new Vector3(0, 0, 1), -Math.PI*0.25).inverse());
281+
preRotations.Left_arm.premultiply(new Quaternion().setFromAxisAngle(new Vector3(0, 0, 1), Math.PI*0.25));
282+
preRotations.Right_arm.premultiply(new Quaternion().setFromAxisAngle(new Vector3(0, 0, 1), -Math.PI*0.25));
283283
} else {
284284
preRotations.Hips.premultiply(new Quaternion().setFromAxisAngle(new Vector3(0, 1, 0), Math.PI));
285285
}
286-
preRotations.Hips.inverse();
286+
for (const k in preRotations) {
287+
preRotations[k].inverse();
288+
}
287289
fixSkeletonZForward(skeleton.bones[0], {
288290
preRotations,
289291
});

0 commit comments

Comments
 (0)