File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -285,6 +285,13 @@ module.exports.Component = registerComponent('cursor', {
285285 }
286286
287287 if ( this . data . rayOrigin === 'xrselect' && evt . type === 'selectstart' ) {
288+ // The controller is one that needs to be rendered by the environment
289+ // the cursor behaviour should be handled by the developer
290+ if (
291+ ( evt . inputSource . targetRayMode === 'tracked-pointer' ) &&
292+ ( this . el . sceneEl . xrSession . environmentBlendMode === 'opaque' )
293+ ) { return ; }
294+
288295 this . activeXRInput = evt . inputSource ;
289296 this . onMouseMove ( evt ) ;
290297 this . el . components . raycaster . checkIntersections ( ) ;
@@ -315,6 +322,13 @@ module.exports.Component = registerComponent('cursor', {
315322 onCursorUp : function ( evt ) {
316323 if ( ! this . isCursorDown ) { return ; }
317324
325+ // If there is no activeInput being pressed or it is not
326+ // the last pressed input then ignore it
327+ if (
328+ data . rayOrigin === 'xrselect' &&
329+ this . activeXRInput !== evt . inputSource
330+ ) { return ; }
331+
318332 this . isCursorDown = false ;
319333
320334 var data = this . data ;
You can’t perform that action at this time.
0 commit comments