Hotspot coding shortcut

  • 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:



    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>

  • One way to it is to store the ath/atv of the hotspot

    Code
    <action name="loadhs1">
                   looktohotspot(get(name)); 
                  wait(blend);
                  copy(prev_ath, ath);
                   copy(prev_atv, atv);
                   loadscene(scene_set2, null, MERGE, BLEND(1));
                   lookat(get(prev_ath),get(prev_atv),130);
                   wait(blend);
              </action>

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!