You are not logged in.

1

Tuesday, September 25th 2012, 12:02am

How to set a panorama to have two different entrance scenes

Dear all,





I m begginer of using the krpano and i have a simple question





I want to create a virtual tour of a road. Lets say that the road has 10 different panoramas. I want to go via hotspots from one panorama to other. everything ok till here. my problem is that when I go upwards i want to load the following panorama "looking" at the same direction with the previous and when I go backwards i want the panorama looking again with the same direction but it doesnt happen.

I can do it only for the one direction (either up or back) but not simultaneously.



In other words i want every panorama to have two "entrance" scenes and to be chosen from the next and the previous panorama respectively. So I would like to ask you how I can do that?





ps. For better explanation lets define the three following panoramas



A B C





from A i want to go to B with looking to C



and From C to go again to B looking to A





thanks in advance *smile* *smile*

Umalo

Professional

Posts: 1,051

Location: Osijek, Croatia, EU

  • Send private message

2

Wednesday, September 26th 2012, 1:59pm

http://krpano.com/docu/xml/#view


You need to play with hlookat & vlookat.
E.g. Use some variable to set your heading.
If (yourvariable=something,
set(view.hlookat,xx);
set(view.vlookat,yy);
,
set(view.hlookat,zz);
set(view.vlookat,xyz);

If you are in A clicking on the hotspot for pano B, before calling pano set the variable to e.g. "north"
If in B clicking on A than set it to "south"
Do you get it?

3

Thursday, September 27th 2012, 9:32am

Hi,

the easiest way might be just to set the viewing direction directly after loading the pano in the hotspot call,

e.g. just do a lookat call after the loadpano call:

Source code

1
<hotspot ... onclick="loadpano(...); lookat(...);" />


best regards,
Klaus

4

Thursday, September 27th 2012, 6:34pm

Thanks guys for the replies! it worked!

5

Friday, November 2nd 2012, 5:03pm

works for loadpano but for loadscene not.

This post has been edited 3 times, last edit by "nixons" (Nov 3rd 2012, 10:53am)


6

Wednesday, November 7th 2012, 12:41pm

works for loadpano but for loadscene not.
There is no difference between loadpano or loadscene in this case, but check if there are some <scene> 'onstart' actions that might interfere in your case...