Skip to content

Commit 302559f

Browse files
committed
Fixed order of multiply translation / scaling
1 parent 4f8d7bc commit 302559f

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

v3/src/math/Matrix4.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,8 +1016,6 @@ var Matrix4 = new Class({
10161016

10171017
yawPitchRoll: function (yaw, pitch, roll)
10181018
{
1019-
// return Matrix.RotationZ(roll).multiply(Matrix.RotationX(pitch)).multiply(Matrix.RotationY(yaw));
1020-
10211019
this.zero();
10221020
_tempMat1.zero();
10231021
_tempMat2.zero();
@@ -1069,8 +1067,8 @@ var Matrix4 = new Class({
10691067
{
10701068
this.yawPitchRoll(rotation.y, rotation.x, rotation.z);
10711069

1072-
_tempMat1.xyz(position.x, position.y, position.z);
1073-
_tempMat2.scaling(scale.x, scale.y, scale.z);
1070+
_tempMat1.scaling(scale.x, scale.y, scale.z);
1071+
_tempMat2.xyz(position.x, position.y, position.z);
10741072

10751073
this.multiplyLocal(_tempMat1);
10761074
this.multiplyLocal(_tempMat2);

0 commit comments

Comments
 (0)