javascriptvirtual-realityreact-360

ReactVR how properly set pointer (raycaster)


I used code (installing it wasn't working for me) from simple-raycaster to display pointer on my VR screen, it works but with some problem - 'behind' me there is square space where this pointer disappears and didn't work. Any idea how can I fix that?


Solution

  • I ran into an issue similar to what you describe. I had several Text elements placed at various locations. I had each wrapped in a VrButton with a onEnter and onExit calling functions to set timeouts gaze select an item. I was seeing the raycaster disappear in a section of space directly behind me. I eventually figured out that if I remove the VrButton wrapper and placed the onEnter and onExit directly on the Text element it solved the problem. Hope this helps.