Ver Fonte

Merge pull request #19969 from WestLangley/dev_update_world_matrix

Object3D: correctly update world matrix prior to use
Mr.doob há 4 anos atrás
pai
commit
e4ecd3ec53
1 ficheiros alterados com 4 adições e 4 exclusões
  1. 4 4
      src/core/Object3D.js

+ 4 - 4
src/core/Object3D.js

@@ -438,7 +438,7 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 		}
 
-		this.updateMatrixWorld( true );
+		this.updateWorldMatrix( true, false );
 
 		return target.setFromMatrixPosition( this.matrixWorld );
 
@@ -453,7 +453,7 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 		}
 
-		this.updateMatrixWorld( true );
+		this.updateWorldMatrix( true, false );
 
 		this.matrixWorld.decompose( _position, target, _scale );
 
@@ -470,7 +470,7 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 		}
 
-		this.updateMatrixWorld( true );
+		this.updateWorldMatrix( true, false );
 
 		this.matrixWorld.decompose( _position, _quaternion, target );
 
@@ -487,7 +487,7 @@ Object3D.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
 
 		}
 
-		this.updateMatrixWorld( true );
+		this.updateWorldMatrix( true, false );
 
 		const e = this.matrixWorld.elements;