|
@@ -201,6 +201,8 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+ controller.userData.targetRayMode = event.data.targetRayMode;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function onSelectEnd( event ) {
|
|
@@ -217,11 +219,12 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
}
|
|
|
|
|
|
function getIntersections( controller ) {
|
|
|
|
|
|
+ controller.updateMatrixWorld();
|
|
|
+
|
|
|
tempMatrix.identity().extractRotation( controller.matrixWorld );
|
|
|
|
|
|
raycaster.ray.origin.setFromMatrixPosition( controller.matrixWorld );
|
|
@@ -233,6 +236,10 @@
|
|
|
|
|
|
function intersectObjects( controller ) {
|
|
|
|
|
|
+ // Do not highlight in mobile-ar
|
|
|
+
|
|
|
+ if ( controller.userData.targetRayMode === 'screen' ) return;
|
|
|
+
|
|
|
// Do not highlight when already selected
|
|
|
|
|
|
if ( controller.userData.selected !== undefined ) return;
|