Nextscene Action: How to loop? How to blend with looktohotspot?

  • Hi,

    I've tried to create an automatic virtual tour and so far it has worked decently despite not really knowing anything about programming. The last two problems that I can't seem to solve are regarding a "next scene" action I'm using, that was posted somewhere on this forum a while ago. (This action is only for when the automatic tour is started, in order to avoid the timer on the first scene switch)

    This is the code I'm using:


    Code
    <action name="nextscene">	add(nextsceneindex, get(scene[get(xml.scene)].index),1);	if(nextsceneindex LT scene.count, looktohotspot(spot1, 120, smooth); loadscene(get(scene[get(nextsceneindex)].name), null, MERGE, ZOOMBLEND(1,1.5)); );</action>

    My first question is how can I loop this action? It works fine on all but the last scene, where I would like it to switch back to scene 1. Right now it just stays there.



    My second question: As you can see I added a "looktohotspot" transition. I wanted to somewhat simulate 3d movement, by turning the view towards the next location and adding a zoomblend. This has halfway worked, but I can't get the looktohotspot and zoomblend to happen simultaneously. So far when it's time to change scene, at first the view rotates and then the zoomblend happens, which doesn't really look the way I want it. Is there a way, to combine these two?

    Any help is much appreciated. It would also be great if you could dumb down your replies as much as possible. Like I said, I'm a total newbie. *g*

    Thanks! /David

  • I managed to fix the problem with the looping by adding this line for equal scene counts, the loop works perfectly now. Only thing that's still needed are the simultaneous transitions.

    Code
    <action name="nextscene">	add(nextsceneindex, get(scene[get(xml.scene)].index),1);	if(nextsceneindex === scene.count, set(nextsceneindex, 1); );	if(nextsceneindex LT scene.count, looktohotspot(spot1, 100, tween); loadscene(get(scene[get(nextsceneindex)].name), null, MERGE, ZOOMBLEND(0.7,2)); );</action>

Jetzt mitmachen!

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