Hi all,
I'm new to KRPano so trying to get me head around its functionality.
I've started with the WebVR example and adapting it to my needs. I've changed the opening scene to a flat image of a map with hotspots. Hotspot positions are -1 to 1 based on the FOV from what I've read but when WebVR is enabled the FOV is larger so the positions are now -180 to 180.
I've added this to the hotspot creation function to change the ath and atv when entering and exiting vr.
Code
onentervr='set(ath=get(athVR)); set(atv=get(atvVR));'
onexitvr='set(ath=get(ath)); set(atv=get(atv));'
This is the function for creating the hotspot:
Code
<action name="add_example_thumb" depth="off" scope="local" args="title, athVR, ath, atvVR, atv, thumburl, clickaction"> addhotspot(auto,thumb);
set(thumb, distorted=false, zorder=1, capture=false, edge="center", flying="0", zoom="false", distorted="false", url=get(thumburl), width=32, height=24, ath=get(ath), atv=get(atv), depth=300, scale=1, onover=tween(depth,300), onout=tween(depth,300), clickaction=get(clickaction), onclick='set(enabled,false); clickaction();', onentervr='set(ath=get(athVR)); set(atv=get(atvVR));', onexitvr='set(ath=get(ath)); set(atv=get(atv));');
set(thumb, autoalpha=true, alpha=0);
set(global.hotspots[get(global.hotspots.length)],get(local));</action>
When I enter VR hotspot positions never change so I'm assuming the onentervr and onexitvr are never called.
Does anyone know what the solution is?
Thanks