[Solved] Is it possible to trace variables?

  • Hi,

    I use these buttons to zoom on my panorama:

    Code
    <plugin name="in"    url="../images/interface/boutons/btn_plus.jpg"  align="bottom" edge="center" y="40" x="-160" blendmode="screen" ondown="set(movevectorz,-1);"  onup="set(movevectorz,0);" onover="set(blendmode,add);" onout="set(blendmode,screen);" />
    <plugin name="out"   url="../images/interface/boutons/btn_minus.jpg" align="bottom" edge="center" y="40" x="-120" blendmode="screen" ondown="set(movevectorz,+1);"  onup="set(movevectorz,0);" onover="set(blendmode,add);" onout="set(blendmode,screen);" />


    I'm trying to limit the zoom range to a minimum and a maximum. I thought about adding a condition in the ondown event, so that if the movevectorsz variable is too low, I cannot zoom more, and if it's too high, I cannot unzoom more.

    I thought about something like that:

    Zoom button:

    Code
    ondown="if (movevectorz<40, set(movevectorz,-1));"


    Unzoom button:

    Code
    ondown="if (movevectorz>80, set(movevectorz>80,+1));"


    The thing is, I don't find how to know the realtime value of the movevectorz variable, it seems not to be in the options plugin I displayed on my panorama.

    Could someone please help me on this?

    Thanks a lot! *thumbup*

    Edited 3 times, last by donnie (August 29, 2010 at 4:24 PM).

  • I just found another cleaner solution to do what I need: I can just use the fovmin and fovmax parameters in the view tag:

    Code
    <view hlookat="90" vlookat="0" fov="90" fovmin="40" fovmax="120" />


    Problem solved!

Participate now!

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