immersive-web / webxr-polyfill

Use the WebXR Device API today, providing fallbacks to native WebVR 1.1 and Cardboard
Apache License 2.0
378 stars 84 forks source link

Are grip/targetRayTransform numbers in GamepadMappings correct? #138

Open takahirox opened 4 years ago

takahirox commented 4 years ago

Hi all.

Background

I'm making WebXR Emulator Extension which imports webxr-polyfill.js.

Problem

I tested Three.js XRControllerModelFactory with the extension. With the extension (webxr-polyfill.js) the controller (grip) or ray direction looks weird as the screenshots below.

On the emulated OculusGo of the extension the controller looks at different direction from the ray's while on real OculusGo the controller and ray seems to look at the same or similar direction.

Three.js XRControllerModelFactory + WebXR Emulator Extension + Emulated Oculus Go in VR mode image

Three.js XRControllerModelFactory+ Real Oculus Go in VR mode com oculus vrshell-20200207-234810_Moment

(FYI, Real Oculus Go out of browser. Looking different even a bit further from in VR mode??) com oculus vrshell-20200207-215304

I haven't looked into other than OculusGo, but I think other devices may have the same issue.

my guess and question

I guess this issue may be from grip/targetRayTransform numbers defined in GamepadMapping.

According to @jsantell, these numbers seems from this commit by @jacobcdewitt. So question, how are these numbers determined? And are these numbers looking correct?

takahirox commented 4 years ago

I removed gripTransform from webxr-polyfill.js for OculusGo then the one emulated by the extension + polyfill looks closer to the real one.

image