Browse Source

Merge pull request #16250 from WestLangley/dev-object_apply_matrix

Object3D: make applyMatrix() more robust
Mr.doob 6 years ago
parent
commit
3a04b06914
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/core/Object3D.js

+ 3 - 1
src/core/Object3D.js

@@ -114,7 +114,9 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 	applyMatrix: function ( matrix ) {
 
-		this.matrix.multiplyMatrices( matrix, this.matrix );
+		if ( this.matrixAutoUpdate ) this.updateMatrix();
+
+		this.matrix.premultiply( matrix );
 
 		this.matrix.decompose( this.position, this.quaternion, this.scale );