New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(WebVR) VR controller fly navigation & bug #940
Comments
Cool. I seem to remember that the new WebXR API has its own controller methods and recommends not to use the Gamepad API but I may be wrong. Anyways, it is still too early to switch from WebVR to WebXR. |
@Joo918 It is really strange that your displayId's don't match. |
@tsturm Really? I wonder if I did something wrong.. There are two Oculus Go controllers I have available and I tried pairing both to see if that made any difference. I still get mismatching displayIDs. |
Using remote debugging with devtools I also get Oculus Go's displayId is 1 while its controller's displayId is 7. https://developer.mozilla.org/en-US/docs/Web/API/Gamepad/displayId#Browser_compatibility says that this is only supported on daydream with chrome. |
Hi, |
Hi Joo918, For more info see: |
Thank you for the guide! I'll try it! |
Hello,
I've implemented a new VR controller navigation method in the webVR branch's
src/util/VRControllerManager.js
where you can fly around by
This will let you look around independent of the direction you are moving. (aka strafing)
The VRControllerManager.js is very messy with all the debug code I wrote at the moment,
so I'll try to push it in after the code is clean.
I'll reply in this thread once I do.
Also during implementation, I noticed a bug.
While connecting the VR Controller after a "gamepadConnected" event,
a controller is connected only if the displayId of the controller matches the VR display's displayId.
However, I've noticed that the two never match.
(In my case, Oculus Go's displayId was 1 while its controller's displayId was 7)
I've currently disabled the displayId matching if-statement to work around the bug.
This isn't a problem for a single player environment,
but it certainly will be in a multiplayer setting where controller input should be bound to a specific display.
I suspect the mismatching is happening due to the controller's displayId initially being set before going into VR mode.
Does anyone know the exact cause of the bug?
The text was updated successfully, but these errors were encountered: