You are not logged in.

  • "PelicanMedia" started this thread

Posts: 10

Location: Colchester, Essex, UK

  • Send private message

1

Wednesday, March 9th 2022, 12:41pm

Show hotspots only in VR

Hi,

I have been struggling to get some hotspots to only show in VR.
I am using the below and they do not show on desktop, mobile, tablet and on the Oculus browser BEFORE clicking on 'Enter VR'. Which is correct.
But they are still not showing when 'entering VR'.

Source code

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

    <action name="hotspot_hide_non_vr" scope="local">
        for(set(local.i,0), i LT hotspot.count, inc(i),
            if(hotspot[get(i)].non_vr_hide,
                if(device.desktop OR device.tablet OR device.mobile,
                    copy(hotspot[get(i)].visible_bak, hotspot[get(i)].visible);
                    set(hotspot[get(i)].visible, false);
                , hotspot[get(i)].visible_bak !== null,
                    copy(hotspot[get(i)].visible, hotspot[get(i)].visible_bak);
                    delete(hotspot[get(i)].visible_bak);
                );
            );
        );
    </action>

    <hotspot non_vr_hide="true" name="spotdown" style="floor_down" ath="0.000" atv="45.000"
        onclick="loadscene(scene_Floor_7_Lobby_Hallway, null, KEEPLOOKAT, OPENBLEND(1.0, 0.0, 0.2, 0.0, linear));" />


I know it's going to be something silly, but I've been staring at it for a while now and am lost. Thanks.

2

Wednesday, March 9th 2022, 8:43pm

hm ...
device.desktop OR device.tablet OR device.mobile is always true, that makes no sense
i think in this place you should check for
" plugin[webvr].isenabled AND hotspot[get(i)].visible_bak === null "