Open Mrbside opened 1 year ago
What would I have to do in order to make the arcursor place my arobject automatically like on modelviewer (webxr)? so theres no need to tap on the screen.
I tried to do the following in my script:
this.addEventListener( "ar-hit-test-achieved", function() { }, { once: true } );
try to trigger "onselect" method in arcursor
sceneEl.components.arcursor.onselect();
Problem: I see onselect method in arcursor asks for a parameter "e" which contains frame and inputSource
onselect(e) { const frame = e.frame; const inputSource = e.inputSource; const referenceSpace = this.el.renderer.xr.getReferenceSpace(); const pose = frame.getPose(inputSource.targetRaySpace, referenceSpace); . . .
Is this a good approach or what would be? Could I use the gaze/fuse system in cursor component?
thank you
What would I have to do in order to make the arcursor place my arobject automatically like on modelviewer (webxr)? so theres no need to tap on the screen.
I tried to do the following in my script:
this.addEventListener( "ar-hit-test-achieved", function() { }, { once: true } );
try to trigger "onselect" method in arcursor
Problem: I see onselect method in arcursor asks for a parameter "e" which contains frame and inputSource
onselect(e) { const frame = e.frame; const inputSource = e.inputSource; const referenceSpace = this.el.renderer.xr.getReferenceSpace(); const pose = frame.getPose(inputSource.targetRaySpace, referenceSpace); . . .
Is this a good approach or what would be? Could I use the gaze/fuse system in cursor component?
thank you