I've got two panos, one hotspot in each linking to the other panorama. I like coding it so that the linked pano is looking at the previous panos hotspot when loaded. I use the following code:
Code
<scene name="scene1">
....
<hotspot
name="hs1"
ath="39" atv="0"
url="assets/hotspot.png"
keep="false"
onclick="loadhs1();"
/>
<action name="loadhs1">
looktohotspot(get(name));
loadscene(scene_set2, null, MERGE, BLEND(1));
lookat(210,0,130);
wait(blend);
</action>
</scene>
<scene name="scene2">
....
<hotspot
name="hs2"
ath="210" atv="0"
url="assets/hotspot.png"
keep="false"
onclick="loadhs2();"
/>
<action name="loadhs2">
looktohotspot(get(name));
loadscene(scene_set1, null, MERGE, BLEND(1));
lookat(39,0,130);
wait(blend);
</action>
</scene>
Display More
What would be the best way to make "lookat(210,0,130);" dynamic?
eg.
<action name="loadhs1">
looktohotspot(get(name));
loadscene(scene_set2, null, MERGE, BLEND(1));
lookat( "get previous scene and hotspot.ath", 0, 130);
wait(blend);
</action>