Sie sind nicht angemeldet.

1

Donnerstag, 23. April 2020, 16:50

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

Donnerstag, 23. April 2020, 17:05

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

Donnerstag, 23. April 2020, 17:08

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

Donnerstag, 23. April 2020, 17:30

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

5

Donnerstag, 23. April 2020, 18:25

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

Quellcode

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

Quellcode

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

6

Donnerstag, 23. April 2020, 21:23

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

Donnerstag, 23. April 2020, 22:48

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

Freitag, 24. April 2020, 02:00

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


Quellcode

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

Freitag, 24. April 2020, 10:15

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:

Quellcode

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

10

Freitag, 24. April 2020, 22:28

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

Thank you very much!