compass for virtual tours  

Got some great idea or a feature request? Post it here and discuss it. The most requested concepts are usually implemented, as Autopano Tour is very community driven.
User avatar
Destiny
Moderator
 
Posts: 5006
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia

by Destiny » Thu Feb 14, 2013 10:15 am

You need to copy the xml code in this thread which is your compass.xml code, and past it into your main xml file..

Destiny..
Primary School Teacher - Hobby Virtual Tours and 3D/360 Object/Product Photographer - Our aim is to create a 3D/360 Virtual Tour Shop/Store with links to 3D/360 degree products. My gear, VR Drive II - D90 - Nikon 10.5 fisheye - Nikon D800 with Nikon-Nikkor 14-24 - NOVOFLEX Magic Balance - Acratech GP Ball-head - Nodal Ninja 4 + RD-16 Rotor - Manfrotto 190CXPRO4 Carbon Fiber Tripod :) :)

no avatar
sundust
Member
 
Posts: 18
Joined: Thu Feb 14, 2013 8:32 am

by sundust » Thu Feb 14, 2013 11:30 am


User avatar
Destiny
Moderator
 
Posts: 5006
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia

by Destiny » Thu Feb 14, 2013 12:09 pm

Hi... I have checked our your xml code and it seems to be fine but something is wrong for it not to work..

Try copying and pasting this replacing your compass xml code...

Destiny...


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

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

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

<!-- compass with rotating pointer -->
<plugin name="compass" url="compassimages/compass_iconMine.png" keep="true" zorder="1" children="false"
align="righttop" x="10" y="10"
scale="1.0" 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_icon_needle.png" keep="true" handcursor="false"
parent="compass" zorder="1"
align="center"
/>
<!--
************** COMPASS END ***************************************************************
Primary School Teacher - Hobby Virtual Tours and 3D/360 Object/Product Photographer - Our aim is to create a 3D/360 Virtual Tour Shop/Store with links to 3D/360 degree products. My gear, VR Drive II - D90 - Nikon 10.5 fisheye - Nikon D800 with Nikon-Nikkor 14-24 - NOVOFLEX Magic Balance - Acratech GP Ball-head - Nodal Ninja 4 + RD-16 Rotor - Manfrotto 190CXPRO4 Carbon Fiber Tripod :) :)

no avatar
sundust
Member
 
Posts: 18
Joined: Thu Feb 14, 2013 8:32 am

by sundust » Thu Feb 14, 2013 12:11 pm

I did it... Thanks :)
I forgot to paste it to second xml...

User avatar
Destiny
Moderator
 
Posts: 5006
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia

by Destiny » Fri Feb 15, 2013 2:22 am

Strange.. You only needed the code on the main xml file. Its a hierarchy code, meaning it effects all of the other xml files.. If however you need it only to be on one Tour.... you simply add the compass code to that xml file so none of the other Tours will have it.. .. It doesn't really matter with this code as long as you have it working I guess..

Destiny..
Primary School Teacher - Hobby Virtual Tours and 3D/360 Object/Product Photographer - Our aim is to create a 3D/360 Virtual Tour Shop/Store with links to 3D/360 degree products. My gear, VR Drive II - D90 - Nikon 10.5 fisheye - Nikon D800 with Nikon-Nikkor 14-24 - NOVOFLEX Magic Balance - Acratech GP Ball-head - Nodal Ninja 4 + RD-16 Rotor - Manfrotto 190CXPRO4 Carbon Fiber Tripod :) :)

no avatar
sundust
Member
 
Posts: 18
Joined: Thu Feb 14, 2013 8:32 am

by sundust » Tue Sep 03, 2013 7:01 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 ***************************************************************-->

User avatar
Destiny
Moderator
 
Posts: 5006
Joined: Mon Apr 26, 2010 11:55 pm
Location: Australia

by Destiny » Tue Sep 03, 2013 9:47 pm

Hi... My advise is to rollover to using PTP V2... Its has many Compass graphics which can be edited.. There are not a lot more options open to you now... ;)

Destiny..
Primary School Teacher - Hobby Virtual Tours and 3D/360 Object/Product Photographer - Our aim is to create a 3D/360 Virtual Tour Shop/Store with links to 3D/360 degree products. My gear, VR Drive II - D90 - Nikon 10.5 fisheye - Nikon D800 with Nikon-Nikkor 14-24 - NOVOFLEX Magic Balance - Acratech GP Ball-head - Nodal Ninja 4 + RD-16 Rotor - Manfrotto 190CXPRO4 Carbon Fiber Tripod :) :)

Previous

Return to Archive - Autopano tour future

Who is online

Users browsing this forum: No registered users and 1 guest