I'm converting the hotspot coordinates to screen coordinates and then I want to get the spherical coordinates back to the h v variables. But if the hotspot has ath=0 and atv=0, then I get the wrong result. What am I doing wrong?
Code
<layer name="info" type="text" x="10" y="10" width="200" />
<hotspot name="test" type="text" ath="0" atv="0" width="30" height="30" bg="true" bgcolor="0x00FF00" distorted="true" />
<events onviewchange="test();" />
<action name="test" >
spheretoscreen(hotspot[test].ath, hotspot[test].atv, hsx, hsy);
screentosphere(hsx, hsy, h,v);
calc(layer[info].html, ' h=' + h + '[br] v=' + v );
</action>
Alles anzeigen
When I rotate the panorama the converted v h values are output
example