You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Tuesday, September 17th 2019, 6:48pm

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

This post has been edited 2 times, last edit by "GIOLETS" (Sep 17th 2019, 9:30pm)


spacerywirtualne

Professional

Posts: 901

Location: Poland, Europe

Occupation: krpano developer : virtual tours

  • Send private message

2

Tuesday, September 17th 2019, 7:20pm

1. maybe this help?

Piotr
spacerywirtualne has attached the following image:
  • Zrzut ekranu 2019-09-17 19.19.05.png
Your own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube

cms4vr team *thumbsup*

3

Tuesday, September 17th 2019, 8:18pm

in webvr.xml
search for addhotspot('webvr_vrsetup', vr_setup_hs);
if you comment the complete if(...); block, the button wont be displayed
ofc you can also change it there to your needs

This post has been edited 1 times, last edit by "indexofrefraction" (Sep 17th 2019, 8:29pm)


4

Wednesday, September 18th 2019, 9:42am

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:

Source code

1
2
3
4
5
6
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.

Source code

1
2
3
4
5
6
7
8
<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

5

Wednesday, September 18th 2019, 12:08pm

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?
GIOLETS has attached the following images:
  • 20190918115802.jpg
  • 20190918120942.jpg

6

Wednesday, September 18th 2019, 12:26pm

Hi,

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

Source code

1
2
3
4
5
6
7
8
9
<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

7

Wednesday, September 18th 2019, 5:15pm

Just to say thank for the help.
It work perfectly.