Hi, I’m currently playing around with WebXR HandTracking and Needle Engine and the question arose if (and how) it is possible to remove the default pointer on Quest?! (attached a screenshot) I already got the hand models working, but the default pointer is not useful atm.
Original Post on Discord
by user 474974683163394049
Just to clarify, with “pointer” you mean the raycast line + raycast hit dot?
Yes, exactly these two
by user 474974683163394049
marcel
(marwi)
November 11, 2022, 12:00am
4
You can disable them inside the WebXRController object (they are just children, you can set the visibility to false)
marcel
(marwi)
November 11, 2022, 12:00am
5
You can access the controllers via the WebXR component, it has a reference to them
Thanks for the hint, but when I try to get the controller I always get ‘undefined’. Even after waiting for the XRSessionStarted event.
by user 474974683163394049
marcel
(marwi)
November 11, 2022, 12:00am
7
How do you get them? The controllers are a bit special
marcel
(marwi)
November 11, 2022, 12:00am
8
So you need to use the accessors on the WebXR component
marcel
(marwi)
November 11, 2022, 12:00am
9
the WebXR instance has them here
marcel
(marwi)
November 11, 2022, 12:00am
10
It’s something on the list to change / refactor
by user 474974683163394049
by user 474974683163394049
the controllers are still undefined
by user 474974683163394049
marcel
(marwi)
November 11, 2022, 12:00am
14
Because “this” is undefined
marcel
(marwi)
November 11, 2022, 12:00am
15
You need to bind your method
marcel
(marwi)
November 11, 2022, 12:00am
16
this.onXRSessionStart.bind(this)
marcel
(marwi)
November 11, 2022, 12:00am
17
(you can try logging console.log(this)
inside of your callback as is and you’ll find that it will print undefined too)
marcel
(marwi)
November 11, 2022, 12:00am
19
You can read up on that here: Function binding
ahhh, yes. thank you ^^ feeling dumb right now
by user 474974683163394049