pmndrs / xr

🤳 VR/AR for react-three-fiber
https://pmndrs.github.io/xr/docs/
Other
2.17k stars 155 forks source link

Enabling hands disables rays #299

Closed patrickkeenan closed 11 months ago

patrickkeenan commented 1 year ago

When hands are recognized, rays disappear. This is a problem if you want to interact with far away objects by pinching. The solution is probably to have a argument to enable rays while hand tracking is active.

https://github.com/pmndrs/react-xr/blob/4d23eb88daa5ae484de05fa157cdc7fe366c2e47/src/Controllers.tsx#L169

CodyJasonBennett commented 1 year ago

You can enable visibility yourself via rayMaterialProps or <Controllers rayMaterial={{ visible: true }} />.

I do agree that this should be configurable when using hand tracking for accessibility purposes.

chenzhutian commented 11 months ago

setting <Controllers rayMaterial={{ visible: true }} /> won't show the hand since the key will be converted to material-visible