diff --git a/examples/jsm/webxr/OculusHandPointerModel.js b/examples/jsm/webxr/OculusHandPointerModel.js index f37838a53728f8..77cdbab4fa4acc 100644 --- a/examples/jsm/webxr/OculusHandPointerModel.js +++ b/examples/jsm/webxr/OculusHandPointerModel.js @@ -329,31 +329,31 @@ class OculusHandPointerModel extends THREE.Object3D { } - intersectObject( object ) { + intersectObject( object, recursive = true ) { if ( this.raycaster ) { - return this.raycaster.intersectObject( object ); + return this.raycaster.intersectObject( object, recursive ); } } - intersectObjects( objects ) { + intersectObjects( objects, recursive = true ) { if ( this.raycaster ) { - return this.raycaster.intersectObjects( objects, false ); + return this.raycaster.intersectObjects( objects, recursive ); } } - checkIntersections( objects ) { + checkIntersections( objects, recursive = false ) { if ( this.raycaster && ! this.attached ) { - const intersections = this.raycaster.intersectObjects( objects, false ); + const intersections = this.raycaster.intersectObjects( objects, recursive ); const direction = new THREE.Vector3( 0, 0, - 1 ); if ( intersections.length > 0 ) { diff --git a/examples/webxr_vr_handinput_pointerclick.html b/examples/webxr_vr_handinput_pointerclick.html index abbff37bf61cee..959e850313de5b 100644 --- a/examples/webxr_vr_handinput_pointerclick.html +++ b/examples/webxr_vr_handinput_pointerclick.html @@ -101,7 +101,7 @@ this.queries.intersectable.results.forEach( entity => { const object = entity.getComponent( Object3D ).object; - const intersections = hp.intersectObject( object ); + const intersections = hp.intersectObject( object, false ); if ( intersections && intersections.length > 0 ) { if ( distance == null || intersections[ 0 ].distance < distance ) { diff --git a/examples/webxr_vr_handinput_pointerdrag.html b/examples/webxr_vr_handinput_pointerdrag.html index 0bb467b2ba2ba7..c4ad217693ba3d 100644 --- a/examples/webxr_vr_handinput_pointerdrag.html +++ b/examples/webxr_vr_handinput_pointerdrag.html @@ -151,7 +151,7 @@ this.queries.intersectable.results.forEach( entity => { const object = entity.getComponent( Object3D ).object; - const intersections = hp.intersectObject( object ); + const intersections = hp.intersectObject( object, false ); if ( intersections && intersections.length > 0 ) { if ( distance == null || intersections[ 0 ].distance < distance ) {