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

ViveController: pose.position/orientation may be null.

上级 e8219699
......@@ -67,8 +67,8 @@ THREE.ViveController = function ( id ) {
var pose = gamepad.pose;
scope.position.fromArray( pose.position );
scope.quaternion.fromArray( pose.orientation );
if ( pose.position !== null ) scope.position.fromArray( pose.position );
if ( pose.orientation !== null ) scope.quaternion.fromArray( pose.orientation );
scope.matrix.compose( scope.position, scope.quaternion, scope.scale );
scope.matrix.multiplyMatrices( scope.standingMatrix, scope.matrix );
scope.matrixWorldNeedsUpdate = true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册