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
[VisionGlass] WebXR fixes #1416
Conversation
WebXR scenes were not rendered in the VisionGlass since 0f55393. The regression was caused by an error specifying the FoV of the immersive display. We were incorrectly using negative sizes for left and bottom as they must be positive. The code is smart enough to compute the FoV in the four directions using absolute figures.
No engine supports the VisionGlass as it has no controllers. We're faking a controller with the phone. Let's just use the Focus 1 controller model as we have been using for HVR.
The controller was not shown in WebXR sessions. It was actually not possible to interact with any experience. The problem was that we were not setting position capabilities to the controller and thus we were not passing that information to the engine (even if the position is emulated as the phone is a 3DoF device). After this change the controller can be seen in WebXR. Also we're setting the number of buttons in the controller to 1 to let experiences adapt to a controller with just one button.
Similar to HVR 3DoF we're using the HAND_NONE version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can now create the WebXR session, but I think it doesn't work as it should. I've tried with Moonrider and XR Dinosaurs and in both I can observe the same issues:
1- I don't see the interstitial widget
2- Once in the WebXR session, the 3D space is too close to the user's view, so it's very difficult to interact with the world.
3- The emulated controller is not synced with the mobile
Right I have seen that too, but I think we can handle it in a separate PR
That's because of the patch that removes the sitting to standing transform. However that heavily depend on the experience, for example try the webxr samples.
I don't understand what this means. In the dinosaurs case I can use the controller to point to UI elements normally. |
I'll try to explain better the weird effect I notice on the pointer; when I move the mobile horizontally, the controller does it is diagonally. However, this happens when I rotate my perspective 90 degrees. As discussed offline, this looks like a calibration issue and indeed I managed to reproduce it in a 2D environment. It seems that when the user's perspective is rotated 90 degrees a new calibration is needed; otherwise the error introduced will be transferred to the WebXR session. |
I'll describe now other issues related to the positioning on the 3D world proposed in the WebXR session, specifically in the Dinosaurs XR game. When I enter the game, my position is rotated 180 degrees in the x axis. The UI elements to select the dinosaurs are on my back. This issue forces me to move my perspective, with the corresponding calibration errors introduced by the mobile. Give that it's not possible (is this a bug ?) to calibrate the pointer inside the WebXR session, it makes the game barely usable. |
Yes that's well know. The accelerometer of the phone aggregates errors as you move away from the original location. As I mentioned this has nothing to do with being inside a WebXR session. This can be seen in the 2D environment, that's why we need recalibration. |
But the actual problem is that the WebXR experience starts in the opposite direction; the UI elements are on my back. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, lets merge this, but we need to investigate the orientation issues.
OK I'll merge the first 4 commits and leave the last one aside. It'll be part of a followup with fixes for the orientation issues. |
05bd812
to
654bcbb
Compare
This PR reenables WebXR rendering in VisionGlass port. It also brings some interesting fixes like: