提交 73bcb8cc 编写于 作者: S sunag

fix getWorldPosition target alert

上级 68661ac3
......@@ -74,7 +74,7 @@ THREE.VelocityNode.prototype.setTarget = function ( target ) {
if ( target ) {
this.position = target.getWorldPosition();
this.position = target.getWorldPosition( this.position || new THREE.Vector3() );
this.oldPosition = this.position.clone();
}
......@@ -85,7 +85,7 @@ THREE.VelocityNode.prototype.updateFrameVelocity = function ( frame ) {
if ( this.target ) {
this.position = this.target.getWorldPosition();
this.position = this.target.getWorldPosition( this.position || new THREE.Vector3() );
this.velocity.subVectors( this.position, this.oldPosition );
this.oldPosition.copy( this.position );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册