Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Montag, 7. Januar 2019, 11:21

Set lookat value for next scene from current scene hotspot (please help!)

Hello,

I'm using latest version (119pr15) and trying to link from Scene A to Scene B by clicking a hotspot that located in Scene A

The thing is the default view of scene B is WEST, but I need to change the "lookat" value to show it at NORTH direction right after clicking the hotspot.

After few days seeking answers here, I tried this way but I doesn't work:

I added a style in vtourskin.xml:

Quellcode

1
<style name="skin_hotspotstyle_quang" url="vtourskin_hotspot.png" scale="0.5" edge="top" oy="0"	       distorted="true"	       onclick="loadscene(get(linkedscene),null,MERGE,BLEND(1)); lookat(get(lookat));"	onhover="if(skin_settings.tooltips_hotspots, if(linkedscene, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS)) );"onover="autoRotateSave"	onout="autoRotateReturn" /> 



and here is tour.xml:

Quellcode

1
<hotspot name="spot1" scale="0.40" rotate="30" style="skin_hotspotstyle_quang" ath="-35.241" atv="50.050" linkedscene="scene_s000" lookat="-3.8,90,120,0,0"/>




but it doesn't work!

I tried to put the lookat value inside the <style>, for example like this:

Quellcode

1
<style name="skin_hotspotstyle_quang" url="vtourskin_hotspot.png" scale="0.5" edge="top" oy="0"	       distorted="true"	       onclick="loadscene(get(linkedscene),null,MERGE,BLEND(1)); lookat(-3.8,90,120,0,0);"	       onhover="if(skin_settings.tooltips_hotspots, if(linkedscene, showtext(get(scene[get(linkedscene)].title),SKIN_TOOLTIPS)) );"	       onover="autoRotateSave"	  	 onout="autoRotateReturn" /> 



so it works, but off course for all hotspot with this style.

So I think the problem here is at:

Quellcode

1
lookat(get(lookat))




How should we define "lookat" value correctly to make it works?


Thank you and sorry for my English explaination.

Regards!

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »rockable84« (7. Januar 2019, 11:41)


Beiträge: 821

Wohnort: Poland, Europe

Beruf: krpano developer : virtual tours

  • Nachricht senden

2

Montag, 7. Januar 2019, 12:53

Hi

You want to download the lookat data from the hotspot, which is no longer in the memory, so this data is gone...

Check it out:

Quellcode

1
<hotspot name="spot1" ... linkedscene="scene_s000" my_lookat="-3.8,90,120,0,0"/>



Quellcode

1
2
3
4
5
6
<style name="skin_hotspotstyle_quang"  onclick="load_scene(get(linkedscene),get(my_lookat));"	... /> 

<action name="load_scene" scope="local" args="linkedscene,my_lookat">    
  loadscene(get(linkedscene),null,MERGE,BLEND(1));     
  lookat(get(my_lookat));
</action>



I have not tested this code but it should work.


regards
Piotr
You own online, cloud tool for creating virtual tours - www.cms4vr.com

facebook page :: facebook group :: youtube

cms4vr team *thumbsup*

3

Montag, 7. Januar 2019, 17:43

Hi,

the vtourskin.xml has already a build-in functionality for setting the looking direction for hotspots:

therefore just add a

Quellcode

1
linkedscene_lookat="H,V,FOV" 
attribute to the <hotspot> (FOV is optional).

E.g.

Quellcode

1
<hotspot name="spot1" style="skin_hotspotstyle" ... linkedscene="scene2" linkedscene_lookat="90,10" ... />


Best regards,
Klaus

4

Montag, 7. Januar 2019, 18:25

linkedscene_lookat="H,V,FOV"
Wow you saved my life! Thank you! Wondering why I couldn't find similar answers in previous posts.

Thank you!