瀏覽代碼

Merge pull request #19969 from WestLangley/dev_update_world_matrix

Object3D: correctly update world matrix prior to use
Mr.doob 4 年之前
父節點
當前提交
e4ecd3ec53
共有 1 個文件被更改,包括 4 次插入4 次删除
  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 );
 		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 );
 		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 );
 		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;
 		const e = this.matrixWorld.elements;