3

I'm pretty new with THREE.js and webXR. The current spec is very confusing to me. the webXR API examples don't show any way to use the THREE.js renderer, and the examples from Three seem to be in a "in between" stage of using webVR vs using webXR.

The current way that I'm aware of is to set the session of renderer.vr to a session that has been requested. While doing this does get me the 3d scene with the camera background, I'm at a loss when it comes to how the scene actually functions. Using requestHitTest() on that session doesn't seem to function, and my default cube is floating somewhere beneath the floor.

When I log the position of the camera while using the demo, this also comes back as 0,0. Is the camera not being moved?

Is there any good place to get accurate examples on how to get these functions to work?

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
NotBramKorsten
  • 304
  • 1
  • 13
  • I'm not sure this is the right forum for this question (asking for external resources is considered off-topic). If you could reform it to show what you have done (how you set up the XR session, how you render, etc.), and share any relevant console messages, it would be much more likely to get an answer, or at least more comments that will help you refine your question. For what it's worth, most AR/XR frameworks that I've seen _do_ keep the camera centered at the origin and move the scene around. It's totally backwards for those of us accustomed to moving a camera instead. – TheJim01 Sep 20 '19 at 19:57

0 Answers0