compass code problem  

Share your tips and tricks here or get help with any Panotour problem!
No bug reports (of any kind) in this forum!
no avatar
sundust
Member
 
Topic author
Posts: 18
Likes: 0 post
Liked in: 0 post
Joined: Thu Feb 14, 2013 8:32 am
Info

compass code problem

by sundust » Tue Sep 03, 2013 7:17 pm

Hi friends I have a problem with the compass code again....
here it is: http://www.helivizyon.com/build/virtualtour.html
Iahve this code on virtualtour.xml file
I havent touched the other xml files.
set heading value is 15 but compass shows different directions on every panorama... cant figure it why and how?

code:
<!--************** COMPASS ***************************************************************-->
<events onxmlcomplete="startup();"
onviewchange="rotatecompasses();"
/>

<!-- show info, set heading, create hotpots -->
<action name="startup">
<!-- SET HEADING -->
set(heading, 15);
</action>

<!-- change the rotation of the compass pointer / compass plate image -->
<action name="rotatecompasses">
sub(plugin[compass_pointer].rotate, heading, view.hlookat);
sub(plugin[compass2_plate].rotate, heading, view.hlookat);
</action>

<!-- compass with rotating pointer -->
<plugin name="compass" url="compassimages/compass.png" keep="true" zorder="1" children="false"
align="lefttop" x="10" y="10"
scale="0.5" scalechildren="true"
destscale="1.0"
onclick="switch(destscale,1.0,0.5);tween(scale,get(destscale));"
heading="0"
/>

<!-- compass pointer, the rotation will be changed in the "onviewchange" action -->
<plugin name="compass_pointer" url="compassimages/compass_pointer.png" keep="true" handcursor="false"
parent="compass" zorder="1"
align="center"
/>

<!-- compass glass cap (flash only, because there is no blendmode in html5) -->
<plugin name="glass" devices="flash" url="compassimages/glass.jpg" keep="true" enabled="false"
blendmode="screen" alpha="0.5"
parent="compass" zorder="2"
align="center"
/>

<!--************** COMPASS END ***************************************************************-->

no avatar
mediavets
Member
 
Posts: 15379
Likes: 0 post
Liked in: 42 posts
Joined: Wed Nov 14, 2007 2:12 pm
Location: Isleham, Cambridgeshire, UK.
Info

by mediavets » Tue Sep 03, 2013 11:26 pm

sundust wrote:Hi friends I have a problem with the compass code again....
here it is: http://www.helivizyon.com/build/virtualtour.html
Iahve this code on virtualtour.xml file
I havent touched the other xml files.
set heading value is 15 but compass shows different directions on every panorama... cant figure it why and how?

Is this created with PTP 1.8 and extra plugin code editing?

PTP2.x makes it easy to set the compass orientation of evey pano separately in the 3D editing panel, just drag the compass 'points' ribbon - first screenshot.

Second screenshot shows compass settings.




Last edited by mediavets on Tue Sep 03, 2013 11:35 pm, edited 1 time in total.
Andrew Stephens
Many different Nodal Ninja and Agnos pano heads. Merlin/Panogear mount with Papywizard on Nokia Internet tablets.
Nikon D5100 and D40, Sigma 8mm f3.5 FE, Nikon 10.5mm FE, 35mm, 50mm, 18-55mm, 70-210mm. Promote control.


Return to Using Panotour / Panotour Pro 1.8

Who is online

Users browsing this forum: No registered users and 2 guests