You are not logged in.

1

Thursday, April 23rd 2020, 4:50pm

WebVR plugin, right eye missing when entering VR from portrait mode.

Hi all,
I created a simple tour using the latest krpano version (1.20.6). I used the "MAKE VTOUR (VR-OPT)" droplet and didn't modify the tour.xml that the droplet generated. On every phone I've tried to access the VR mode from, I have the following glitch: if the phone is in landscape mode when accessing VR, everything works perfectly, but whenever I access VR from portrait mode, I can only see the first half of the left eye and have to exit VR and enter again in landscape mode for it to work properly.

My tour is uploaded at https://migueldeavila.github.io/SimplePanoTour/index.html and the .xml is at https://migueldeavila.github.io/SimplePanoTour/tour.xml

If anyone could enlighten me as to what's going on, I would really appreciate it!

2

Thursday, April 23rd 2020, 5:05pm

tested on iphone7, everything works normal.
you cant see 2 eyes in portrait on a mobile,
it shows the icon to turn the mobile
and after doing that you see both eyes

what mobile are you using?

3

Thursday, April 23rd 2020, 5:08pm

The problem is that when I enter from portrait mode I want it to automatically switch to landscape. It does do that, but the right eye goes missing during the transition and it looks very ugly. I tested with a Samsung Galaxy A50 and Galaxy A70

4

Thursday, April 23rd 2020, 5:30pm

This is what it looks like when entering from portrait mode.

5

Thursday, April 23rd 2020, 6:25pm

I was able to solve this by removing the webvr setting overrides that were in the vtourskin.xml file. Replaced this:

Source code

1
<!--plugin name="webvr" keep="true" devices="html5.and.webgl"	        url="calc:skin_settings.webvr == true ? '%VIEWER%/plugins/webvr.js' : null"	        onavailable="skin_webvr_onavailable();"	        onentervr="skin_showloading(false); webvr_onentervr(); skin_webvr_setup(); skin_reloadscene_webvr();"	        onexitvr="webvr_onexitvr(); skin_webvr_setup(); skin_reloadscene_webvr();"	        -->


with

Source code

1
<plugin name="webvr" keep="true"/>

6

Thursday, April 23rd 2020, 9:23pm

I managed to fix the bug when entering VR from portrait mode but the bug still persists when doing transitions in VR using hotspots. Does anyone know what causes something like the image I posted above?

7

Thursday, April 23rd 2020, 10:48pm

Hi,

try changing the webxr setting the html file back to the default "auto":
https://krpano.com/docu/html/#webxr

In your screenshot it looks like the Android Chrome and it's buggy WebXR mode is used.

When using the "auto" setting, krpano will use its own 'MobileVR' mode instead of the Android Chrome WebXR mode.

You could test the different VR APIs also here on your device:
https://krpano.com/examples/webxr/

Best regards,
Klaus

8

Friday, April 24th 2020, 2:00am

Thank you Klaus, after changing the setting back to auto the VR function works properly when visiting the site directly.

However, the VR option is now missing whenever I embed my site into an iframe, even if I include the following line


Source code

1
allow="xr-spatial-tracking"



The VR option does appear to be available inside an iframe only when I set webxr to prefer. Can you think of any workaround to embed my tour into an iframe?

9

Friday, April 24th 2020, 10:15am

The krpano MobileVR mode is using the accelerometer and gyroscope sensors for the motion tracking in VR, not the browsers WebVR or WebXR APIs.

Try that:

Source code

1
allow="autoplay;accelerometer;gyroscope;magnetometer;fullscreen;vr;wake-lock;xr-spatial-tracking;"

10

Friday, April 24th 2020, 10:28pm

You are absolutely correct Klaus! That did the trick. It works perfectly when embedded now!

Thank you very much!