autotour with if condition

  • next step (I never give up...):
    I have an xml-file which defines all scenes, one after each other.
    I now want to load the next scene, after a full circle is completed.
    I tried this - which, of course, doesn't work ;-); after each scene node:

    Code
    ...
    	</scene>
    	<action>
    		if(view.hlookat==85,loadscene(get(nextscene), null, MERGE, ZOOMBLEND(1,2));
    	</action>


    Where did I go wrong?
    (I don't want to use time; I want the scene to change at a given hlookat value)
    thx!

  • Hi,

    first you would need to define that 'full circle is completed',
    where to start?
    and how to do that (tweens, lookto, autorotate, ...)
    and where would you detect it (after the tween/lookto, in the onviewchanged event?)

    a exact compare like view.hlookat == 85 will probably not work, when e.g. the extact value is 85.0012 or so,

    to explain a solution to full startup situation and the exact wanted behavior would be needed to know,

    best regards,
    Klaus

  • thank you Klaus for response!
    Each scene has an initial view hlookat and it autorotates. I'd like the "full circle" be defined by 355° from that starting point. Thus, after one full circle, the next scene would blend in. ALso, if a user interacts, the pano would finish rotating to the starting point and blend the next scene.

    and where would you detect it (after the tween/lookto, in the onviewchanged event?)

    well, that I don't know... thtat's why I tried an if condition checking against a given hlookat value...

  • .
    I tried Falkos suggestion from the panorama community board, but I can't get it to work. This is how I implemented it:
    .

  • dankeeee!!!!
    Leider tut sich nichts *sad* ... das nächste Pano wird nciht eingeblendet.
    http://www.wishbone-design.de/assets/panos/tour.html
    Verlange ich zu viel???
    So habe ich es jetzt versucht:

  • Hi,

    sorry, der Code ist leider nicht ganz einfach zu durchschauen...

    z.B. warum hier zwei mal der gleiche Aufruf?
    if(hposreal==25,loadscene(get(scene[1].name), null, MERGE, ZOOMBLEND(1,2));
    if(hposreal==25,loadscene(get(scene[0].name), null, MERGE, ZOOMBLEND(1,2));

    Warum möchtest du unbedingt per <autorotate> eine Drehung vollführen?
    Warum nicht per lookto() oder tween()?
    Diese Actions sind dafür vorgesehen sich steuern zu lassen, das <autorotate> dagegen ist eigentlich bloss für eine automatische Drehung wenn nichts im Pano nichts tut... das hat keine Start und End Events,

    Schöne Grüße,
    Klaus

  • danke, dass du dir das angesehen hast.

    Warum möchtest du unbedingt per <autorotate> eine Drehung vollführen?
    Warum nicht per lookto() oder tween()?


    Die Absicht ist, die Tour automatisch ablaufen zu lassen - aber im Unterschied zur step inc Methode nach einem Benutzereingriff nicht zum letzten Punkt zu springen, sondern einfach die autorotation wieder aufzunehmen. Von dort aus dann aber die autotour wieder weiterlaufen zu lassen! Das wäre für viele Szenarien geschmeidiger, nahtloser als step inc.
    Das heißt, ein lookto 360 geht nicht, denn man weiß ja nicht, wo der Nutzer oder Nutzerin das pano angehalten hat.

    z.B. warum hier zwei mal der gleiche Aufruf?
    if(hposreal==25,loadscene(get(scene[1].name), null, MERGE, ZOOMBLEND(1,2));
    if(hposreal==25,loadscene(get(scene[0].name), null, MERGE, ZOOMBLEND(1,2));


    pano [0] ist geladen. Wenn es beim vorgesehenen Punkt (hier:25°) angekommen ist, wird pano [1] geladen. Wenn dieses beim vorgesehenen Punkt angekommen ist, wird pano [0] geladen.

    .

  • Wie wäre es mit einer Kombi aus der "step inc" Variante und der "if hposreal" Variante?:


    aber natürlich funktioniert das wieder nicht, es wird noch nicht mal das erste Pano gezeigt...

    Warum möchtest du unbedingt per <autorotate> eine Drehung vollführen?
    Warum nicht per lookto() oder tween()?


    über die angegebenen Gründe (keine Sprünge) hinaus ist die Rotation bei autorotate angeblich gleichmäßiger

    .

Participate now!

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