Browse Source

WebXRManager: Only display controller when targetRayMode is pointing.

Mr.doob 5 năm trước cách đây
mục cha
commit
7aba69b75a
1 tập tin đã thay đổi với 6 bổ sung1 xóa
  1. 6 1
      src/renderers/webxr/WebXRManager.js

+ 6 - 1
src/renderers/webxr/WebXRManager.js

@@ -352,7 +352,12 @@ function WebXRManager( renderer, gl ) {
 
 					controller.matrix.fromArray( inputPose.transform.matrix );
 					controller.matrix.decompose( controller.position, controller.rotation, controller.scale );
-					controller.visible = true;
+
+					if ( inputSource.targetRayMode === 'pointing' ) {
+
+						controller.visible = true;
+
+					}
 
 					continue;