I resolved the problem, yes, but partially...
So I set the "onclick" of the skin_hotspotstyle in vrtourskin.xml with KEEPALL and add the action "orientation":
|
Source code
|
1
|
onclick="if(linkedscene, tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); loadscene(get(linkedscene),null,KEEPALL,BLEND(1)); orientation(); skin_updatescroll(); );"
|
The action "orientation" is:
|
Source code
|
1
|
<action name="orientation"> add(view.hlookat,get(pointing)); set(view.vlookat,0); set(view.fov,90);</action>
|
(I set the vlookat to 0 as the KEEPALL can give some tilt, and same with fov, but these settings can be ignored )
So this action refers to a variable "pointing" that I need to set in the vtour.xml at each hotspot:
|
Source code
|
1
|
<hotspot name="spot6" style="skin_hotspotstyle" ath="111.792" atv="15.943" linkedscene="scene_069" pointing="leaving_pano_heading - destination_pano_heading" />
|
This means that the "pointing" variable will have a number that is the result of the "heading" value of the leaving pano minus the "heading" of the destination pano.
As I said, I have an image map with radar etc., and had found the "heading" for all the panos.
Now I can calculate manually all the "pointing" and set for each link the value, and this works
but it would be nice to make it automatically, getting the values from the map, something like:
|
Source code
|
1
|
<hotspot name="spot6" style="skin_hotspotstyle" ath="111.792" atv="15.943" linkedscene="scene_069" pointing="sub(pointing,get(layer[map_point_start].heading),get(layer[map_point_destination].heading)" />
|
this doesn't work, I'm sure that I'm doing something wrong with "sub" but can't realize what....
thanks
Toni