提交 d4157b3c 编写于 作者: M Mr.doob

FlyControls improvement suggested by @WestLangley in #2992.

上级 08d94046
......@@ -194,9 +194,8 @@ THREE.FlyControls = function ( object, domElement ) {
this.tmpQuaternion.set( this.rotationVector.x * rotMult, this.rotationVector.y * rotMult, this.rotationVector.z * rotMult, 1 ).normalize();
this.object.quaternion.multiply( this.tmpQuaternion );
this.object.matrix.setPosition( this.object.position );
this.object.matrix.setRotationFromQuaternion( this.object.quaternion );
this.object.matrixWorldNeedsUpdate = true;
// expose the rotation vector for convenience
this.object.rotation.setEulerFromQuaternion( this.object.quaternion, this.object.eulerOrder );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册