You could add a couple of actions like the one explained by Klaus here
Toggle, hide-unhide HotSpots HTML5/ JS Viewer iPhone/iPad
You'd need two actions, one assigned to onentervr and one assigned to onexitvr
For example:
- In the code of hotspots to be hidden, add an attribute novrspot="yes"
- add two actions
|
Source code
|
1
|
<action name="hidespot"> for(set(i,0), i LT hotspot.count, inc(i), if(hotspot[get(i)].novrspot == yes, set(hotspot[get(i)].visible,false); ); );</action>
|
|
Source code
|
1
|
<action name="showspot"> for(set(i,0), i LT hotspot.count, inc(i), if(hotspot[get(i)].novrspot == yes, set(hotspot[get(i)].visible,true); ); );</action>
|
- Call the actions at onentervr and onexitvr
eg.
<plugin name="WebVR" ... onentervr="... hidespot();" onexitvr="... showspot();"
- Can also add this to the hotspots code
|
Source code
|
1
|
onloaded="if(webvr.isenabled == true, set(visible, false);); if(webvr.isenabled == false, set(visible, true););"
|
This will ensure the hidden hotspots don't reappear after switching/reloading scenes while still in VR Mode.