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:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
<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>
|
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>