|
@@ -119,6 +119,19 @@ Object.assign( WebXRController.prototype, {
|
|
|
|
|
|
if ( inputSource && frame.session.visibilityState !== 'visible-blurred' ) {
|
|
|
|
|
|
+ if ( targetRay !== null ) {
|
|
|
+
|
|
|
+ inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );
|
|
|
+
|
|
|
+ if ( inputPose !== null ) {
|
|
|
+
|
|
|
+ targetRay.matrix.fromArray( inputPose.transform.matrix );
|
|
|
+ targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
if ( hand && inputSource.hand ) {
|
|
|
|
|
|
handPose = true;
|
|
@@ -186,19 +199,6 @@ Object.assign( WebXRController.prototype, {
|
|
|
|
|
|
} else {
|
|
|
|
|
|
- if ( targetRay !== null ) {
|
|
|
-
|
|
|
- inputPose = frame.getPose( inputSource.targetRaySpace, referenceSpace );
|
|
|
-
|
|
|
- if ( inputPose !== null ) {
|
|
|
-
|
|
|
- targetRay.matrix.fromArray( inputPose.transform.matrix );
|
|
|
- targetRay.matrix.decompose( targetRay.position, targetRay.rotation, targetRay.scale );
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
if ( grip !== null && inputSource.gripSpace ) {
|
|
|
|
|
|
gripPose = frame.getPose( inputSource.gripSpace, referenceSpace );
|