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

  • 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));

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

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

    Best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!