Sie sind nicht angemeldet.

1

Freitag, 14. März 2014, 22:54

Rotate pano as the navigation direction

Hi, how i can rotare the orientation of the pano when i navigate in it?

Example:
I have 4 pano: garden, door, hall, room

I have oriented it from garden to room, but when i go from room to garden, i see all the pano oriented not in the direction that i'm walking, but in the default orientation, what i have to do for to have a solution like google street view, or boogle busines photos?

Thanks.

2

Dienstag, 18. März 2014, 14:38

Hi,

this can be done, by setting the looking direction directly after loading the new pano/scene,

e.g. use a command sequence like this:

Quellcode

1
loadscene(...); lookat(...);


Best regards,
Klaus

3

Mittwoch, 19. März 2014, 09:31

Hi, how i can rotare the orientation of the pano when i navigate in it?
Thanks.

Like this?:
http://krpano.com/tours/bkeller/

4

Donnerstag, 3. April 2014, 16:28

Yess, like the example, but without the auto rotation after the loading of new pano.

How i can do?

Can i use the standard hospot code and add a custom funcrion on click?
Thanks.

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »grollaz« (3. April 2014, 22:10)


5

Donnerstag, 3. April 2014, 22:50

Hi!
Read the response from Klaus! *tongue*
And I explain to you, because I'm generous today! *g*

And see documentation, http://krpano.com/docu/actions/#lookat:
lookat(atH, atV, fov*)
Look at this panorama position.
Parameters:
  • atH
    Horizontal position in degrees, spherical coordinates (-180 to +180).
  • atV
    Vertical position in degrees, spherical coordinates (-90 to +90).
  • fov (optionally)
    The new field of view in degrees (0 - 179).
Example:
loadpano(pano.xml); or loadscene(scene_name);
lookat(45.1, -20.2, 110.0);


If you use standart vtourskin file in your tour, standart hotspot code and etc., see action for onclick in scene:
.......
<!-- place your scene hotspots here -->
<hotspot name="spot1" style="skin_hotspotstyle" ath="-27.931" atv="5.787" linkedscene="scene_entrance" />


Open vtourskin.xml and look to style for all hotspots:
<style name="skin_hotspotstyle" url="hotspot-arrow.png" scale="0.60" edge="top" oy="0" distorted="false"
crop="0|0|128|128" ondowncrop="128|0|128|128" onovercrop="128|0|128|128"
tooltip=""
onclick="if(linkedscene, skin_hidetooltips(); tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot(); loadscene(get(linkedscene),null,MERGE,BLEND(1)); skin_updatescroll(); );"
onloaded="if(skin_settings.tooltips_hotspots, if(linkedscene, copy(tooltip,scene[get(linkedscene)].title); loadstyle(skin_tooltips); ));"
/>


When the scene is loadedit is displayed with the parameters that are specified in the view:
<view hlookat="66.851" vlookat="0.484" fov="109.0" fovtype="MFOV"....

If you want use your parameters for different direction from hotspots when scene is onload, must be deleted line in hotspotstyle or create new hotspotstyle without: onclick="if(linkedscene,.......
And put manual your parametrs in each hotspot onclick action in scenes, like this:
<!-- place your scene hotspots here -->
<hotspot name="spot1" style="skin_hotspotstyle" ath="-27.931" atv="5.787"

onclick="skin_hidetooltips(); tween(scale,0.25,0.5); tween(oy,-20,0.5); tween(alpha,0,0.5); looktohotspot(); loadscene(scene_name),null,MERGE,BLEND(1)); lookat(-135,0,82); skin_updatescroll();"/>

Good luck! *thumbup*
Cheers,
Arsen
Panoreal — to make and see this wonderful world! *whistling*

6

Donnerstag, 3. April 2014, 23:13

BTW! Very nice and "smart solution" from Klaus in your case:
Hotspot hlookat - vlookat problem


*thumbsup*
Panoreal — to make and see this wonderful world! *whistling*