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.

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,337

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

1

Tuesday, October 1st 2013, 4:13pm

action during lookto

Hi,

i made this auto tour function where i use lookto(blablabla
But to use any button i need first to interrupt and then the menu buttons work.
So the user needs to click twice for that.

I was wondering, as there is a stopdelayedcall and stoptween function, if there is or maybe is possible to have something like an stoplookto action swell..

what i want to achieve is that the hover and onover onclick etc etc still works during a lookto action..

Cheers
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Alexey Tkachenko

Professional

Posts: 760

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

2

Tuesday, October 1st 2013, 4:42pm

Why not simply use nonblocking (true) inside these lookto(bla-bla-bla) ? *rolleyes*
Regards,

Alexey

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,337

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

3

Tuesday, October 1st 2013, 5:15pm

ah yes . smart!
Didn't know, never used that one..
Thanx!

tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,337

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

4

Tuesday, October 1st 2013, 5:22pm

mmm.. but i like to interrupt aswell..

*cry*

lookto(get(tmp_hlookat),0,90,smooth(2,2,2), false, true, inc(step); );

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

This post has been edited 1 times, last edit by "Tuur" (Oct 1st 2013, 5:33pm)


Tuur

Sage

  • "Tuur" started this thread

Posts: 3,337

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

5

Wednesday, October 2nd 2013, 3:17pm

ok solved!

the only solution is to call another lookto action to break this nonblocked one..
like:

Source code

1
lookto(get(view.hlookat),get(view.vlookat),get(view.fov));


Cheers,

Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

6

Thursday, February 20th 2014, 5:27pm

Hello Tuur,

Im with the same problem.

Can you help me?

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,337

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

7

Thursday, February 20th 2014, 6:15pm

Sure,
Describe your problem and maybe get us some code from where we can go.
Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

8

Thursday, February 20th 2014, 6:46pm

Thank you so much for your agile reply.

I've a autotour in my project like this and i'd like to add a layer to pause/play autotour on the onclick event. How can i do this?

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<action name="load_new_scene">
		loadscene(%1, null, MERGE, ZOOMBLEND(1,2));
		wait(0.1);
		wait(BLEND);	
	</action>


	<action name="autotour">
		oninterrupt(break);
		
		if(step == 1, oninterrupt(set(step,1)); 
		lookto(360, get(view.vlookat),get(view.fov), smooth(200,200,15), false); inc(step););
		
		if(step == 2, load_new_scene(scene1); inc(step););
		
		if(step == 3, oninterrupt(set(step,3)); 
		lookto(360, get(view.vlookat),get(view.fov), smooth(200,200,15), false); inc(step););
		
		if(step == 4, load_new_scene(scene2); inc(step););
		
		if(step == 5, oninterrupt(set(step,5)); 
		lookto(360, get(view.vlookat),get(view.fov), smooth(200,200,15), false); inc(step););
		
		if(step == 6, load_new_scene(scene3); inc(step););
		
		if(step == 7, oninterrupt(set(step,7)); 
		lookto(360, get(view.vlookat),get(view.fov), smooth(200,200,15), false); inc(step););
		
		if(step == 8, load_new_scene(scene4); inc(step););
		
		if(step == 9, set(step,1); autotour(););
	</action>


Thanx!!

Tuur

Sage

  • "Tuur" started this thread

Posts: 3,337

Location: Netherlands

Occupation: Krpano custom coding / Virtual Tours / Photography / Musician / Recording engineer

  • Send private message

9

Friday, February 21st 2014, 11:56am

Sorry i'm abroad without laptop.
Will have a look later.
Maybe somebody else can jump in for you?


Tuur *thumbsup*
http://www.virtualtuur.com
Skype:studiotuur

10

Saturday, February 22nd 2014, 4:04pm

Thanks Tuur, problem solved!

To whom it may concern:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<action name="startup">
if(startscene === null, copy(startscene,scene[0].name));
    loadscene(get(startscene), null, MERGE);

    set(step,1); 
    set(idletime,4);
    set(events.onidle, delayedcall(autotour, 30.0, if(step LT scene.count, load_new_scene(get(scene[get(step)].name));inc(step),load_new_scene(get(scene[0].name));set(step,1);)););
</action>

<events onclick="stopdelayedcall(autotour);" name="start_full" keep="true"  />

<action name="load_new_scene">
    loadscene(%1, null, MERGE, ZOOMBLEND(1,2));
    wait(0.1);
    wait(BLEND);	
</action>

<autorotate enabled="true"
    waittime="1.0" 
    speed="-13.0" 
    horizon="10.0" 
/>


Salutos,