problems in auto tour

  • Hi,

    At first, please forgive me for poor English.
    I wrote some code for auto tour, based on Klaus' code from old post :
    Auto Tour with user control and resume?

    It seems to work, but something bad has happened. That means, it does not stop immediately, but try to do next action.
    For example, when I clicked the mouse in the middle of "lookto(180,0,120, linear(15)); " (step==1), then the krpano breaks the routine and continue to run "lookto(180,90, 110, linear(15)); " and "lookto(180,90, 60, linear(15));". So I have to wait 2-3 seconds. During the action, I can't do anything but have to wait!!

    FYI, I have added the codes to the auto-gererated code by "MAKE VTOUR(NORMAL).bat".

    Please help me to solve this problem. I searched and searched this forum, but I can't find related post.

    Min

    Code
    set(idletime,8);skin_hideskin();	oninterrupt(breakall(); skin_showskin();  );  
    
    
    if(step == 1, lookat(0,0,120); lookto(180,0,120, linear(15)); lookto(180,90, 110, linear(15)); lookto(180,90, 60, linear(15)); inc(step); ); 
    if(step == 2,loadscene(scene_001,null,KEEPBASE|NOPREVIEW,BLEND(2));lookat(0,0,120); wait(blend); lookto(90,0,120,linear(15)); lookto(90,0, 60,linear(15)); 	inc(step); );	
    if(step == 3, set(step, 1););

    Edited once, last by heomin61 (September 25, 2012 at 3:35 AM).

  • Wow!!

    Thanks, Klaus!

    Finally I got an answer. :)  
    I tried it and it works, even if it does not work as I imagined.


    oninterrupt(stopall(); skin_showskin(); set(layer[sidebar].visible, true); );


    That means, when I click the mouse, and then it should stop rotation and show skin.
    However, the stopall() seams to stop rotation and do nothing.

    Anyway, I will try more. Thanks again for your kind help. *rolleyes*

    Min.

Participate now!

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