Sie sind nicht angemeldet.

1

Donnerstag, 26. September 2019, 11:52

Do NOT see a hotspot with vr glasses

I try not to see a hotspot when wearing vr glasses.
The code I have given is this:

Quellcode

1
<hotspot name = "z105" handcursor = "true" distorted = "true" url = "imag / lupa_plus.png" scale = "0.3" ath = "- 111.785" atv = "6.043" scale.mobilevr = "0" />

But the instruction scale.mobilevr = "0" does not work for me and the hotspot is still visible when I wear the glasses.
Any suggestions?

Beiträge: 1 117

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours : the cms4vr owner

  • Nachricht senden

2

Donnerstag, 26. September 2019, 12:12

Hi,

Static data is read-only. You must change visible="false" or scale="0" dynamically. Eg:

Quellcode

1
<events name="myevz105" keep="true" webvr_onentervr="set(hotspot[z105].scale, 0.0)" webvr_onexitvr="set(hotspot[z105].scale, 0.3)" />


Piotr
Your own professional, online cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: youtube :: wiki.cms4vr.com

cms4vr team *thumbsup*

3

Sonntag, 29. September 2019, 09:38

It doesn't work for me *sad*
In http://www.imaginartejuegos.com/prueba_hotspot/ I have prepared a test.
Hotspot 1 has nothing special.
Hotspot 2 has the code:

Quellcode

1
<hotspot name = "z105" handcursor = "true" distorted = "true" url = "imag / lupa_plus2.png" scale = "0.6" style = "tooltip" tooltip = "scale.mobilevr" ath = "180" atv = "-10" scale.mobilevr = "0" />

Hotspot 3 has the code you indicate:

Quellcode

1
<hotspot name = "myevz272" handcursor = "true" distorted = "true" url = "imag / lupa_plus3.png" scale = "0.6" style = "tooltip" tooltip = "webvr_onentervr" ath = "190" atv = "- 10 "webvr_onentervr =" set (hotspot [z105] .scale, 0.0) "webvr_onexitvr =" set (hotspot [z105] .scale, 0.3) "/>

I am doing something wrong?
Regards

4

Mittwoch, 9. Oktober 2019, 07:33

Partially solved

Thank you very much Spacerywirtualne.
In the link http://www.imaginartejuegos.com/prueba_hotspot/ I have already managed to understand what needs to be done to make it work.
The code would be:

Quellcode

1
<events name = "myevz44" keep = "true" webvr_onentervr = "set (hotspot [z44] .scale, 0.0)" webvr_onexitvr = "set (hotspot [z44] .scale, 0.3)" /><hotspot name = "z44" handcursor = "true" distorted = "true" url = "imag / lupa_plus1.png" scale = "0.6" style = "tooltip" tooltip = "Normal" ath = "160" atv = "- 10 "/>  <events name = "myevz105" keep = "true" webvr_onentervr = "set (hotspot [z105] .scale, 0.0)" webvr_onexitvr = "set (hotspot [z105] .scale, 0.3)" />    <hotspot name = "z105" handcursor = "true" distorted = "true" url = "imag / lupa_plus2.png" scale = "0.6" style = "tooltip" tooltip = "scale.mobilevr" ath = "180" atv = "-10" scale.mobilevr = "0" />

The problem is that I have more than 15 hotspot in each scene and more than 10 scenes. It is a bit tedious to put the events in each of the hotspot of all of them.
How could I have a single event for everyone and maybe an instruction to add to the hotspot to call the event, or something like that?

5

Mittwoch, 9. Oktober 2019, 08:45

Other inconvenience

Even putting the events in one scene, moving to the other does not work anymore.
If he gets out of the glasses and re-enters, then it does work in the second scene.

6

Mittwoch, 9. Oktober 2019, 09:49

it does not make sense to have one event for each of your hotspots
and events with keep=true are global, you better don't define those in scenes

but, here is a better solution for you

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<events name="webvr_hotspot_hide" keep="true" 
	webvr_onentervr="webvr_hotspot_hide(true);" 
	webvr_onexitvr="webvr_hotspot_hide(false);" 
	/>

<action name="webvr_hotspot_hide" scope="local" args="hide">
	for(set(local.i,0), i LT hotspot.count, inc(i),
		if(hotspot[get(i)].webvr_hide,
			if(hide,
				copy(hotspot[get(i)].visible_bak, hotspot[get(i)].visible);
				set(hotspot[get(i)].visible, false);
				trace(hotspot[get(i)].name,' is now hidden');
			, hotspot[get(i)].visible_bak !== null,
				copy(hotspot[get(i)].visible, hotspot[get(i)].visible_bak);
				delete(hotspot[get(i)].visible_bak);
				trace(hotspot[get(i)].name,' is now visible');
			);
		);
	);
</action>

<scene name="..." >
	<hotspot name="z105" webvr_hide="true" ... />
</scene>


the event and action are global and to be defined OUTSIDE of the scenes
together they will handle visibility on all hotspots having this marker: webvr_hide="true"

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (9. Oktober 2019, 10:27)


7

Donnerstag, 10. Oktober 2019, 11:01

A small problem to finish off.

Thank you Indexofrefraction ;-)
It is perfect, although it has a small problem when there is more than one scene, which I have not been able to solve:
In the example http://www.imaginartejuegos.com/prueba_hotspot/ I added one more scene (there are now 2). When passing from one to another, from inside the VR glasses, the hotspots are not kept hidden.
If I leave the VR glasses and re-enter, in any of the scenes, the hotspot of that scene disappears, but not those of the others.
In fact, when I return to the first scene, from inside the VR glasses, the missing buttons reappear.

8

Donnerstag, 10. Oktober 2019, 12:42

ok, this is because a new scene does not trigger the events ...

let's do it differently...
we dont need onenter/exitvr, we can use onnewscene,
because enter/exit vr always reloads the scene.
in webvr_hotspot_hide() we check webvr isenabled and hide or show.

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<events name="webvr_hotspot_hide" keep="true" 
	webvr_onnewscene="webvr_hotspot_hide();" />

<action name="webvr_hotspot_hide" scope="local">
	for(set(local.i,0), i LT hotspot.count, inc(i),
		if(hotspot[get(i)].webvr_hide,
			if(plugin[webvr].isenabled,
				copy(hotspot[get(i)].visible_bak, hotspot[get(i)].visible);
				set(hotspot[get(i)].visible, false);
				trace(hotspot[get(i)].name,' is now hidden');
			, hotspot[get(i)].visible_bak !== null,
				copy(hotspot[get(i)].visible, hotspot[get(i)].visible_bak);
				delete(hotspot[get(i)].visible_bak);
				trace(hotspot[get(i)].name,' is now visible');
			);
		);
	);
</action>

<scene name="..." >
	<hotspot name="z105" webvr_hide="true" ... />
</scene>

9

Donnerstag, 10. Oktober 2019, 13:55

It still does not work

I have uploaded the new code and now it doesn't work even when you enter vr glasses.
You can see it in the same link.
Gracias.

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

10

Donnerstag, 10. Oktober 2019, 14:17

Hi)

You use normal panoramas and in your case there's no scene reload when going to VR mode. (as far as I can see). Try the same code but with multiresolution panoramas from VR-optimised make Vtour droplet (MAKE VTOUR (VR-OPT) droplet.bat).
Regards,

Alexey

11

Donnerstag, 10. Oktober 2019, 18:38

Hi. I have done the test, doing everything again from the beginning with the optimized droplet vtour, and the problem persists.

12

Donnerstag, 10. Oktober 2019, 19:28

ups...

<events name="webvr_hotspot_hide" keep="true" onnewscene="webvr_hotspot_hide();" />

my bad ! *whistling*

13

Donnerstag, 10. Oktober 2019, 19:50

It doesn't work for me ;-(

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<events name="webvr_hotspot_hide" keep="true" 
	webvr_onentervr="webvr_hotspot_hide(true);" 
	webvr_onexitvr="webvr_hotspot_hide(false);" 
 onnewscene="webvr_hotspot_hide();" 
	/>


<action name="webvr_hotspot_hide" scope="local" args="hide">
	for(set(local.i,0), i LT hotspot.count, inc(i),
 if(hotspot[get(i)].webvr_hide,
 if(hide,
 copy(hotspot[get(i)].visible_bak, hotspot[get(i)].visible);
 set(hotspot[get(i)].visible, false);
 trace(hotspot[get(i)].name,' is now hidden');
 , hotspot[get(i)].visible_bak !== null,
 copy(hotspot[get(i)].visible, hotspot[get(i)].visible_bak);
 delete(hotspot[get(i)].visible_bak);
 trace(hotspot[get(i)].name,' is now visible');
 );
 );
	);
</action>

14

Donnerstag, 10. Oktober 2019, 21:01

you're taking the wrong code,
take the 2nd example, with the correction

like this:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<events name="webvr_hotspot_hide" keep="true" 
	onnewscene="webvr_hotspot_hide();" />

<action name="webvr_hotspot_hide" scope="local">
	for(set(local.i,0), i LT hotspot.count, inc(i),
		if(hotspot[get(i)].webvr_hide,
			if(plugin[webvr].isenabled,
				copy(hotspot[get(i)].visible_bak, hotspot[get(i)].visible);
				set(hotspot[get(i)].visible, false);
				trace(hotspot[get(i)].name,' is now hidden');
			, hotspot[get(i)].visible_bak !== null,
				copy(hotspot[get(i)].visible, hotspot[get(i)].visible_bak);
				delete(hotspot[get(i)].visible_bak);
				trace(hotspot[get(i)].name,' is now visible');
			);
		);
	);
</action>

<scene name="..." >
	<hotspot name="z105" webvr_hide="true" ... />
</scene>

15

Freitag, 11. Oktober 2019, 08:56

Solved

Yeeeees!!!
Solved!!!
It is perfect!!!
*thumbsup*

Thank you
Regards

17

Freitag, 11. Oktober 2019, 14:31

Unexpected error.

Here we say: "Mi gozo en un pozo" (my joy in a well), because the solution, which seemed to work well, does strange things that I don't know how to solve and that can be appreciated by entering the link .

1. The scene in which you press for vr glasses does not eliminate the hotspot. When you move on to the next scene they do disappear from the second. When you return to the previous one, the buttons that were seen before have disappeared. It is as if the scene change works, but not access to vr glasses.
2. When you leave the VR glasses, the buttons do not recover.
HELP *cry*

18

Freitag, 11. Oktober 2019, 18:02

you didnt port the MAKE VTOUR (VR-OPT) scene settings.

all scenes must have
- havevrimage="true"
- an <image> with if="!webvr.isenabled" --> for non-vr
- an <image> with if="webvr.isenabled" --> for vr

drop one image on both droplets and compare the difference in the <scene> definition
then port these to your tour (and add the new image files)

what happens is, if you change from/to vr and scene[xyz].havevrimage is true
the scene gets reloaded. for non-vr the full multires is loaded, for vr a smaller single file pano is loaded
so the onnewscene event is always triggered on change and the hotspots get set.

hope you get this done... *huh*

19

Mittwoch, 27. November 2019, 18:38

Solved OK

Quellcode

1
2
<events name="webvr_hotspot_hide" keep="true" 	onnewscene="webvr_hotspot_hide();" />
<action name="webvr_hotspot_hide" scope="local">	for(set(local.i,0), i LT hotspot.count, inc(i),		if(hotspot[get(i)].webvr_hide,			if(plugin[webvr].isenabled,				copy(hotspot[get(i)].visible_bak, hotspot[get(i)].visible);				set(hotspot[get(i)].visible, false);				trace(hotspot[get(i)].name,' is now hidden');			, hotspot[get(i)].visible_bak !== null,				copy(hotspot[get(i)].visible, hotspot[get(i)].visible_bak);				delete(hotspot[get(i)].visible_bak);				trace(hotspot[get(i)].name,' is now visible');			);		);	);</action>


And then in the hotspot in scenes to disappear in VR vision, put:

Quellcode

1
webvr_hide="true"



Perfecto result.
Thanks for the help