Hand Tracking - Pointer

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. :sweat_smile:

Original Post on Discord

by user 474974683163394049

Just to clarify, with “pointer” you mean the raycast line + raycast hit dot?

Yes, exactly these two :slightly_smiling_face:

by user 474974683163394049

You can disable them inside the WebXRController object (they are just children, you can set the visibility to false)

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

How do you get them? The controllers are a bit special

So you need to use the accessors on the WebXR component

the WebXR instance has them here
image.png

It’s something on the list to change / refactor

image.png

by user 474974683163394049

by user 474974683163394049

the controllers are still undefined

by user 474974683163394049

Because “this” is undefined

You need to bind your method

this.onXRSessionStart.bind(this)

(you can try logging console.log(this) inside of your callback as is and you’ll find that it will print undefined too)

thats javascript :slightly_smiling_face:

You can read up on that here: Function binding

ahhh, yes. thank you ^^ feeling dumb right now :upside_down_face:

by user 474974683163394049