WebVR mode: how to hide the "VR SETUP" button?

  • My intention is, in WebVR mode(using for example Oculus Go) :
    1)to hide VR SETUP button that now appear looking down ;
    2)to replace the button with a logo (an hotspot). And in this case I know how to place an hotspot on ath="0" atv="90", but I really wish that, as the "VR SETUP" button does, always remain with the same orientation also moving the point of view. How to resolve?

    Thanks to all.
    Luca

    Edited 2 times, last by GIOLETS (September 17, 2019 at 9:30 PM).

  • Hi,

    that 'VR SETUP' hotspot gets only added when the VR-controller has only ONE button (like on the Oculus Go),
    on other controllers with more buttons the VR Setup is accessible by pressing another button.

    To remove that remove in the webvr.xml these lines:

    Code
    if(global.webvr.isvrbrowser AND global.webvr.vrcontrollers[0].buttons.length LE 2,
        <!-- when there are only two buttons on the VR controller (e.g. Oculus Go) use an extra hotspot for the VR-setup -->
        addhotspot('webvr_vrsetup', vr_setup_hs);
        vr_setup_hs.loadstyle('webvr_button_style');
        set(vr_setup_hs, keep=true, ath=0, atv=90, depth=160, zorder=999, torigin=view, html='VR SETUP', oversampling=3, scale=0.2, onclick='vrsetup_open();', onloaded='renderloop( copy(ath,view.hlookat); );');
    );


    And in this case I know how to place an hotspot on ath="0" atv="90", but I really wish that, as the "VR SETUP" button does, always remain with the same orientation also moving the point of view. How to resolve?


    E.g.

    Code
    <hotspot ...
      ...
      ath="0"
      atv="90"
      depth="160"
      torigin="view"
      zorder="999"
      />


    The torigin=view makes it moving with the view,
    the depth is for the height / distance to that hotspot (in this case 160cm),
    and the zorder=999 is used to draw it always above other things, even when something other would be more near.

    Best regards,
    Klaus

  • Thanks to indexofrefraction and Klaus for the prompt and useful tips.
    I've resolved and understood about the visibility of the VRSETUP button now.
    About the second question, pherhaps I was unclear.
    I'm trying to explain me better:using an Oculus Go, I wish to position a .png file (my logo) in order to have always the same orientation in relationship to the user eyes, also with if he moves the head around.

    In other words I wish to have the words present in my logo always readable (I've attached a sample of what I need).

    In desktop view I have correctly realized it defining:in webvr.xlm

    <hotspot name="spot9" style="skin_hotspotstyle_logo" keep="true" ath="0" atv="90" depth="160" torigin="view" zorder="999" scale="1" />in vtourskin.xml
    <style name="skin_hotspotstyle_logo" url="logo_tondo.png" edge="center" distorted="false"
    tooltip=""
    linkedscene=""
    linkedscene_lookat=""
    />

    But with Oculus Go the image still remain locked.
    Since the "VR Setup" button works exactly how I wish, I suppose that in some parts I have to insert an expression like:
    onloaded='renderloop( copy(ath,view.hlookat)',

    I think it's too much for me... can I have a little help?

  • Hi,

    right, that loop to update the rotation should be added too:

    Code
    <hotspot ...
      ...
      ath="0"
      atv="90"
      depth="160"
      torigin="view"
      zorder="999"
      onloaded="renderloop(copy(ath,view.hlookat))"
      />

    Additionally try to set distorted="true".

    Also try to clear the browser cache on the Oculus Go.

    Best regards,
    Klaus

Participate now!

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