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, July 8th 2013, 11:05am

Hotspot hlookat - vlookat problem

I am using 1.16.4 version now. In 1.0.8 version it was
possible to add hlookat="" vlookat="" parameters to
hotspots to be able to start whereever I want in the next scene like this:

<hotspot name="liv" ath="193"
atv="7" style="_hotspot_ani"

icon_type="arrow"
toscene="restaurant" hlookat="80" vlookat="0"


fov="120"/>

But in 1.16.4 version, the code is like this:


<hotspot name="spot1"
style="skin_hotspotstyle" ath="97.536"


atv="6.633" linkedscene="restaurant"
/>

As you know there are no hlookat=""
vlookat="" parameters. I included them manually but it did not work.

Going in a street from one point to another point in one
direction it is OK. But, coming back to the start point using hotspots is a
problem. While coming back, our face must look at the opposite direction.


I think there must be a way to solve the problem. I could
not find an answer in the forum.

Thank you in advance.
Best Regards,
Engin Yarbasan

This post has been edited 1 times, last edit by "xinttr" (Jul 8th 2013, 11:17am)


2

Tuesday, July 16th 2013, 8:20am

I have the same issue, and i've got 25 panos to walk through =))
Please somebody help asap! *thumbup*

Alexey Tkachenko

Professional

Posts: 757

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

3

Tuesday, July 16th 2013, 9:25am

Hi to all of you! *tongue*

I've just played with it and got it working, although via some tricky way, but anyway it seems to work.
I based my code on the loadscene(); action where one must state the variables of the loaded pano.

See documentation here:
http://www.krpano.com/docu/actions/#loadscene

These parameters are separated by '&' sign in Flash and "&amp;" in html5. And I found out that

Source code

1
loadcene(scene2,view.hlookat=get(hotspot[get(name)].hlookat)& view.vlookat=get(hotspot[get(name)].vlookat), MERGE, BLEND(2));" 


doesn't work, I suppose because these 'vars' flags don't support dynamic retrieving of the variable.

So i went the other way: when mouse goes over the hotspot, there's a variable created via txtadd(); action and this variable contains all the data required for loading of the next pano( including those 'hlookat' and 'vlookat' parameters added by get(); action). Then the hotspot's onclick is changed to the "hs_onclick" built by the txtadd(); action.

I have hotspots with uniform style:

Source code

1
2
3
4
5
6
7
8
9
<style name="hotspots"
	width="27" height="27" keep="false" enabled="true"
	crop="0|0|27|27" onovercrop="0|27|27|27" ondowncrop="0|54|27|27" scale="1" alpha="1.0" zoom="false" 
	onhover="showtext('get(hotspot[get(name)].tooltip)');"
	onover="txtadd(hs_onclick, 'lookto(get(hotspot[get(name)].ath),0,50,tween(easeInSine,2),true,false);wait(0.1);if(device.flash, 
 loadscene(get(linkedscene),view.hlookat=','get(hotspot[get(name)].hlookat)','&view.vlookat=','get(hotspot[get(name)].vlookat)',',MERGE,ZOOMBLEND(2,3)); , loadscene(get(linkedscene),view.hlookat=','get(hotspot(get(name)).hlookat)','&amp;view.vlookat=get(hotspot(get(name)).vlookat),MERGE,BLEND(2)););');
	set(onclick, 'get(hs_onclick)');"
	onout="action(autoRotateReturn);hide_tooltip();"
	/>


And hotspots themselves are:

Source code

1
2
3
4
5
6
<hotspot name="hs_test" style="hotspots"
	  url="%SWFPATH%/hotspots/left.png" linkedscene="villa_elena_k"
	  ath="0" atv="0" 
      hlookat="90" vlookat="0"	  
	  tooltip="Go to the pano with predefined view parameters"
	/>


Try this code, I suppose it should work fine *tongue*


Hope this helps!
Regards,

Alexey

This post has been edited 2 times, last edit by "Alexey Tkachenko" (Jul 16th 2013, 10:02am)


Alexey Tkachenko

Professional

Posts: 757

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

4

Tuesday, July 16th 2013, 9:30am

It has just struck me that there's no "onover" on ipads etc. How could I forget this *smile* *smile* ....

So I'm going to refine this method, if it's worth it *tongue*
Regards,

Alexey

Alexey Tkachenko

Professional

Posts: 757

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

5

Tuesday, July 16th 2013, 9:33am

Well, just change the "onover" to "onloaded" *tongue* so that it doesn't matter whether it's Flash or html5...

Source code

1
2
3
4
5
6
7
8
9
<style name="hotspots"
	width="27" height="27" keep="false" enabled="true"
	crop="0|0|27|27" onovercrop="0|27|27|27" ondowncrop="0|54|27|27" scale="1" alpha="1.0" zoom="false" 
	onhover="showtext('get(hotspot[get(name)].tooltip)');"
	onloaded="txtadd(hs_onclick, 'lookto(get(hotspot[get(name)].ath),0,50,tween(easeInSine,2),true,false);wait(0.1);if(device.flash, 
 loadscene(get(linkedscene),view.hlookat=','get(hotspot[get(name)].hlookat)','&view.vlookat=','get(hotspot[get(name)].vlookat)',',MERGE,ZOOMBLEND(2,3)); , loadscene(get(linkedscene),view.hlookat=','get(hotspot(get(name)).hlookat)','&amp;view.vlookat=get(hotspot(get(name)).vlookat),MERGE,BLEND(2)););');
	set(onclick, 'get(hs_onclick)');"
	onout="action(autoRotateReturn);hide_tooltip();"
	/>


Please, give me any feedback if this helped or not *smile*
Regards,

Alexey

This post has been edited 1 times, last edit by "Alexey Tkachenko" (Jul 16th 2013, 10:01am)


Alexey Tkachenko

Professional

Posts: 757

Location: Sevastopol, Crimea, Russian Federation

Occupation: Interpreting, Building virtual tours

  • Send private message

6

Tuesday, July 16th 2013, 9:44am

If this code works fine, then there's one issue left - to integrate it into the standard hotspot style used by default in the droplets. Or adjust this style after the xml was generated. I never used the standard skin, but I think such integrating won't be a great trouble...
Regards,

Alexey

7

Tuesday, July 16th 2013, 12:41pm



Thanks! I'll try it within couple hours! *thumbsup*

8

Tuesday, July 16th 2013, 8:40pm

Work in opera, but doesn't work in chrome...
And is a bit complicated...
Who knows any other way?

9

Wednesday, July 17th 2013, 10:28am

Hi,

I would recommend a way like this:

1. load the load the scene with the loadscene() action
2. then set the view direction with the lookat() action (or set it via set(view.hlookat,...)

e.g.

Source code

1
2
3
4
5
6
7
8
<hotspot (or style) ...
  ...
  hlookat="..."
  vlookat="..."
  ...
  onclick="...; loadscene(...); lookat(get(hlookat),get(vlookat)); ... ";
  ...
  />


Best regards,
Klaus

10

Wednesday, July 17th 2013, 8:48pm

Hi,

I would recommend a way like this:



Thanks a lot, Klaus!
Please, can you provide the code "if" for vtourskin.xml?
I put your code into vtourskin like this:

Source code

1
2
3
4
5
6
7
<style name="skin_hotspotstyle" url="vtourskin_hotspot.png" scale="0.5" edge="top" oy="0"
	       distorted="true"
	       onclick="if(linkedscene, tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); lookat(get(hlookat),get(vlookat)); skin_updatescroll(); );"
	       onhover="if(skin_settings.tooltips_hotspots, if(linkedscene, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS)) );"
	       onover="autoRotateSave"
		   onout="autoRotateReturn"
		   /> 


And now i can add hlookat and vlookat to any hotspot i want, but the problem is now, that if i don't add hlookat vlookat to hotspot, it wouldn't load the pano with "set as startup view" settings, but will give me a black screen...


Thanks a lot! =)

11

Wednesday, July 24th 2013, 9:18pm

Hi,

try:
onclick="if(linkedscene, tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); if(hlookat !== null, lookat(get(hlookat),get(vlookat)); ); skin_updatescroll(); );"

Best regards,
Klaus

12

Sunday, May 28th 2017, 11:02am

try:
onclick="if(linkedscene, tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); if(hlookat !== null, lookat(get(hlookat),get(vlookat)); ); skin_updatescroll(); );"
Hi, Klaus.
This code works in version 1.18, but it is not working in version 1.19-pr10. What could be the reason?

13

Monday, January 15th 2018, 4:31pm

Google Streetview Feeling

Fallbeispiel:
Blick der Startszene zum nächsten Hotspot; Klick auf Hotspot, von der Startszene ausgegangen -> zum zweiten Hotspot gerade aus
Blick der Zweiten Szene zum nächsten Hotspot; Klick auf Hotspot, von der zweiten Szene ausgegangen -> zum dritten Hotspot gerade aus
Blick der dritten Szene quasi umgedreht zum zweiten Hotspot, Klick auf Hotspot, bon der dritten Szene ausgegangen -> zum zweiten Hotspot gerade aus
!!! Jetzt soll der blick nicht zum dritten hotspot wieder sein, sondern auf den Startszenen hotspot sein. also sich nicht wieder umdrehen zum letzten punkt !!!

Hab auch ne kleine Skizze gemacht :D

Vielen Dank für eure Hilfe!

LG Anjenehm


Tuur

Sage

Posts: 3,169

Location: Netherlands

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

  • Send private message

14

Monday, January 15th 2018, 6:44pm

Hi,

this is quite simple.

Source code

1
2
3
4
<action name="Move">
	loadscene(%1, null,MERGE,ZOOMBLEND(0.5));
	lookat(%2,%3,%4); <!-- hlookat,vlookat,fov -->
</action>

I made you a quick example.
http://virtualtuur.com/krpano/return/1/

xml: http://virtualtuur.com/krpano/return/1/tour.xml
Can be smarter, more extended etc of course..


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

15

Monday, January 15th 2018, 8:15pm

Hi,

this is quite simple.

Source code

1
2
	loadscene(%1, null,MERGE,ZOOMBLEND(0.5));
	lookat(%2,%3,%4);

I made you a quick example.
http://virtualtuur.com/krpano/return/1/

xml: http://virtualtuur.com/krpano/return/1/tour.xml
Can be smarter, more extended etc of course..


Hope it helps
tuur *thumbsup*
Thank you so much!