Hi, I would like to set the width of a distorted hotspot depneding on the screen resolution, I would like the hotspot to fill 100% of the screen when the device is on portrait mode and 50% in landscape.
with onviewchange="set(hotspot[myhotspot].width,stagewidth)"it doesn't work as expected, is it because when distorted is set to true then the width and height is relative to a 1000px cube ?
So how could I achieve this ?
Second problem, on android default browser a bottom bar comes over krpano, so I have to change oy value of the hotspot to keep it visible :
Code
<events name="compass"
onviewchange="
sub(hang,get(header),get(view.hlookat));
sub(vang,-90,get(view.vlookat));
set(hotspot[level].rx,get(vang));
set(hotspot[level].rz,get(hang));
div(oylevel,get(stageheight),2);
if(stagewidth GT stageheight, action(is_horizontal), action(is_vertical));
" />
<action name="is_horizontal">
sub(oylevelok,get(oylevel),200);
set(hotspot[level].oy,get(oylevelok));
set(hotspot[level].width,100%);
set(hotspot[level].height,prop);
</action>
<action name="is_vertical">
sub(oylevelok,get(oylevel),400);
set(hotspot[level].oy,get(oylevelok));
set(hotspot[level].width,70%);
set(hotspot[level].height,prop);
</action>
Alles anzeigen
Is there a better way to do so ?
here is the online example : http://www.irealite360.com/saint_nazaire
Many thanx !