Change logo size in VR mode

  • Hi guys
    I added a logo to my tour, and it looks great in desktop (normal mode)
    However, if I go into WebVR mode (or use VR mode from a mobile device), then the logo is over the left eye, and pretty HUGE!

    If I change the scale tag, then it scales everywhere, not just in normal mode. How can I keep it as is in normal mode, but make it smaller in VR mode?

  • Hi Klaus
    In the tour.xml I added a line:

    Code
    <layer name="skin_logo" url="logos/mainlogo.png" scale="0.5" keep="true" vr="true" enabled="false" align="lefttop" x="10" y="10"/>


    Would that mean, your code is in the vtourskin.xml file and I need to modify the variables according to my "skin_logo", I would end up with:

    Code
    <events name="skin_logo" keep="true"
            webvr_onentervr="set skin_logo.scale,0.1);"
            webvr_onexitvr="set skin_logo.scale,1.0);"
            />

    Is that correct?

  • About your code - that would be the correct syntax:

    Code
    webvr_onentervr="set(layer[skin_logo].scale,0.1);"
    webvr_onexitvr="set(layer[skin_logo].scale,1.0);"

    But normally layers are getting hidden when in VR mode.
    Your's is only keeping showing-up because of the vr="true" setting you have added.

    But note - in 'real' WebVR (not the Cardboard fallback) all layers are always hidden when being in VR mode.
    That's because there only WebGL content is possible and layers are HTML, not WebGL.

    That means if you really want to show a logo in VR, doing this as hotspots would be the better solution.

    Best regards,
    Klaus

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!