You are not logged in.

1

Saturday, March 23rd 2013, 4:56pm

dynamic photo orientation via variable

Hy, i'm new to this tool, i read many topics but i didn't find the answer to my problem, so thats my point, during navigation via hot spot i need to orient the photo i'm entering, and i find this option very easy, in the hotspot tag i define a variable orient, and in the load scene i pass the value to the new scene, the problem is that when i write the direct orientation vaule everything works, when i try to read orient variable nothing works, here is the code:

this is the hotspot
<hotspot name="spot1" style="skin_hotspotstyle" ath="-43.035" atv="3.872" linkedscene="scene_10350014hd" orient="45" />

and here is where i use the orient
loadscene(get(linkedscene),view.hlookat=get(orient),null,MERGE,BLEND(1)); );

if i write like this everythig works
loadscene(get(linkedscene),view.hlookat=45,null,MERGE,BLEND(1)); );

i think is just a sintax problem or i don't know, any help will be glad.
thanks

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

2

Monday, March 25th 2013, 5:11pm

why not defining the scene with orientation (hlookat, vlookat):
<scene name="scene_name">

<view hlookat="186" vlookat="0" fovtype="MFOV" fov="90" maxpixelzoom="1.0" fovmin="70" fovmax="120" limitview="auto" />

.
.
.

</scene>


if you want to read it from hotspot defined orient parameter as in your example you should use:
set(view.hlookat, get(hotspot(spot1).orient));

3

Thursday, March 28th 2013, 6:59pm

Hi,
loadscene(get(linkedscene),view.hlookat=get(orient),null,MERGE,BLEND(1)); );
The get() action can be only used to resolve a whole parameter - that means it can't be used in that way.
And another problem is that there is one parameter too much - MERGE and BLEND need to be shifted on parameter left.

Btw - I would recommend that code - simply setting the hlookat value after the loadscene call:

Source code

1
loadscene(get(linkedscene),null,MERGE,BLEND(1)); set(view.hlookat,get(orient)) );


Best regards,
Klaus

4

Sunday, April 28th 2013, 12:04pm

thanks a lot for your answer, I solved more or less like your example. you give me a good hint, sorry for not thank you before, i post my answer but may be i didn't published

5

Saturday, May 27th 2017, 11:35pm

.

This post has been edited 1 times, last edit by "Vasily" (May 28th 2017, 11:01am)