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:

    Code
    <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?

  • 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:

    Code
    <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:

    Code
    <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

  • 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:

    Code
    <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?

  • 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

    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"

  • Thank you Indexofrefraction *wink*
    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.

  • 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.

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

    like this:

  • 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*

  • 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*

  • Code
    <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:

    Code
    webvr_hide="true"


    Perfecto result.
    Thanks for the help

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!