Just a Straight up Simple Lookto from Point A to Point B

  • I've got a pano all up and ready, and I've seen some of these other people's tweens where it's just a calm turn around the room. When they take control, it let's them look around and when they let go, it eventually starts up again to smoothly pan around the room.

    I took a look at the example on the site and I have no idea how to implement something like that! Where do I put it in my pano? How do I tell it to let the user play with it? How do I tell it how long before resuming the pan? I was hoping if there was just some simple example I could use that and then play with the controls a bit until I get used to what parameters I need for what.

    Any ideas, suggestions?

    Update: I found out that what I'm looking for is the lookto command, but plugging it into my startup action is messing with my other code.

    Code
    <action name="startup">	 if(startscene === null, copy(startscene,scene[0].name));
     loadscene(get(startscene), null, MERGE);	
     skin_hideskin(); <!-- start with control bar minimized -->	
     realtor_mobile();<!-- mobile realtor area minimized -->		
    playsound("bg", "sound.mp3|sound.wav", 0);<!-- start music loading both filetypes for browers differences -->		
    toggle_sound();<!-- start tour with sound off -->
    </action>

    So when I plug it in at the end, the menu bar pops up. If I put it in somewhere else, it messes that up. Where can I put it that it won't interfere with the rest of my tour?

    Thanks

    Edited 4 times, last by Tebasaki (November 19, 2013 at 9:43 PM).

  • I'm still trying to figure out where to put it. Right now I slap it into my startup but I'm going to try to put it in an action for each scene so I can customize where it looks. I'm also hoping that by putting in the oninturrupt(break) it will resume when I leave it idle...

    oninterrupt(break);
    lookto(150,30);
    wait(1);
    lookto(242,0);
    lookto(280,-10);
    wait(1);

    Edit: Nope. I placed this code after the </image> tag and before the <hotspot> tag and I got nothing working.
    <action name="BRlookto">
    oninterrupt(break);
    lookto(150,30);
    wait(1);
    lookto(242,0);
    lookto(280,-10,);
    wait(1);
    </action>

    Edit 2: I placed the action before all the scenes and then in the first scene call I put the action in the onstart:

    <scene name="scene_blue_skies" title="Blue Skies Room" onstart="BRlookto();" thumburl="panos/blue_skies.tiles/thumb.jpg" lat="" lng="" heading="">

    It still makes the menu stay popped up (instead of starting minimized) and I've been messing with the speed.

    <action name="BRlookto">
    oninterrupt(break);
    lookto(150,30,smooth(100,50,20));
    wait(1);
    lookto(242,0);
    lookto(280,-10);
    wait(1);
    </action>

    It seems to work OK if I put in the z-axis lookto(150,30,0,smooth(100,50,20)); but I don't want it to zoom.

    Edit 3:
    Ok, I just typed in the FOV for what the room is and it seems to work (not zooming)

    <action name="BRlookto">
    oninterrupt(break);
    lookto(150,30,120,smooth(100,50,20));
    wait(1);
    lookto(242,0,120,smooth(100,50,20));
    wait(1);
    lookto(380,30,120,smooth());
    wait(1);
    </action>

    My main startup seems to be where the issue of the menubar popping up and the intro image flashing when moving to the second lookat.

    <action name="startup">
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);
    skin_hideskin(); <!-- start with control bar minimized -->
    realtor_mobile();<!-- mobile realtor area minimized -->
    playsound("bg", "sound.mp3|sound.wav", 0);<!-- start music loading both filetypes for browers differences -->
    toggle_sound();<!-- start tour with sound off -->
    </action>
    If I move the skin_hideskin() function up, then it disappears when the tour starts up but when I break the lookat action or the action finishes the menubar pops back up.
    So how do I make it continue after user interruption?
    How can I make it stop interrupting the menubar hiding?
    How can I make it stop flashing the introimage after the first wait(1)?

    Edited 3 times, last by Tebasaki (November 19, 2013 at 10:55 PM).

  • Edit 4: I've switched to the set idea to allow it to continue when interrupted.


    <action name="startup">
    if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);
    skin_hideskin(); <!-- start with control bar minimized -->
    realtor_mobile();<!-- mobile realtor area minimized -->
    playsound("bg", "sound.mp3|sound.wav", 0);<!-- start music loading both filetypes for browers differences -->
    toggle_sound();<!-- start tour with sound off -->
    set(step,1);
    set(idletime,1);
    set(events.onidle, autotour() );
    </action>

    <action name="autotour">
    oninterrupt(break);
    if(step == 1, lookto(150,30,120,smooth(10,50,5)); inc(step); );
    if(step == 2, wait(1); inc(step); );
    if(step == 3, lookto(320,0,120,smooth(10,50,5)); inc(step); );
    if(step == 4, wait(1); inc(step); );
    if(step == 5, lookto(380,30,120,smooth(10,50,5)); inc(step); );
    if(step == 6, wait(1); set(step,1); );
    </action>

    This works great! The tour loads and there's no popping on the intro image, and the menubar stays hidden. Now I can't seem to get it to change the path when another scene is loaded. I tried to create another action "autotour1" and modify the lookto and then added it to the onstart"" for the next scene but it only stays with the first one! How can I create a unique lookto action for each scene?

Participate now!

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