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

Friday, March 14th 2014, 10:54pm

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

Tuesday, March 18th 2014, 2:38pm

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:

Source code

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


Best regards,
Klaus

Arsdezi

Intermediate

Posts: 174

Location: Ukraine

  • Send private message

3

Wednesday, March 19th 2014, 9:31am

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

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

4

Thursday, April 3rd 2014, 4:28pm

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.

This post has been edited 1 times, last edit by "grollaz" (Apr 3rd 2014, 10:10pm)


Arsdezi

Intermediate

Posts: 174

Location: Ukraine

  • Send private message

5

Thursday, April 3rd 2014, 10:50pm

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*

Arsdezi

Intermediate

Posts: 174

Location: Ukraine

  • Send private message

6

Thursday, April 3rd 2014, 11:13pm

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*