You are not logged in.

Dear visitor, welcome to krpano.com Forum. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, September 24th 2012, 9:05am

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

Source code

1
2
3
4
5
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););	

This post has been edited 1 times, last edit by "heomin61" (Sep 25th 2012, 3:35am)


2

Thursday, September 27th 2012, 9:41am

Hi,

try:
oninterrupt(stopall(); ...);

best regards,
Klaus

3

Thursday, September 27th 2012, 12:50pm

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.