look to action, long way round

  • Sometimes on my lookto actions the doesn't go straight there, i.e. it should only need to look to a few degrees counter clockwise but instead it goes all the way round clockwise.

    Example: Click on the beach, click back to the pier and the view is set to look at the hotspot the viewer just came from i.e. the beach. The final view should be a few degrees to the right, but it goes all the way round to the left!?

  • Hi viewinz,

    Your code is a little complicate *g* *wink* ... I do not know what it can be... *wacko* I suggest you, for test, to try minimising your code to the essential.... look if it works... add the next step... look if it works... To try finding where is the mistake.. *sad*

    I have noticed that when you go to the marine_parade2vanhaldengalley, after loaded, it make 720º around... *wacko* *question*

    *sleeping*
    Salut..

  • Hi Michel,

    What you see in the editor XML probably looks more complicated than it is. I've built it in a funny way so I have actions for everything I want it to in one xml document for many tours.. in the future build new tours will be very simple!


    I've fixed that one you found, I had an extra 7 in the hlookat i.e. 777! Thanks for that.

    My problem is that sometimes KRpano looks the long way around and sometimes it goes directly to where it is supposed to. It might be a bug this this version.

  • Hi viewinz,

    The thing I really do not understand is why there is more added hotspot than the expected.
    For example, when I am on the van_halden_gallery pano I gets those hotspots listed in the editor:

    • ext2door
    • ext2marine_parade
    • marine_parade2vanhaldengalley_
    • ext2door___
    • ext2door__
    • ext2door_
    • ext2marine_parade_

    *question*

    Salut.

  • I must have called your action twice.

    I'll look for it.

    EDIT: I've not called it twice.

    What seems to be happening is when you click on a hotspot and trace(name) that gets stored and kept in the next scene, so when I run the action you wrote for me (other post) it creates a new hotspot with the traced name as well as all the other hotspots generated from your action. I changed the action so the new hotspots just have the original hotspot name with '_' at the end.

    In that scene (outside the gallery) There are 2 hotspots:

    Code
    <hotspot name="ext2door" ath="58" atv="-2" style="hs_button"         onover="hs_text()"         onhover=""         onout=""         ondown="hs(door,door2ext)"         onup=""         onclick=""         flying="0"><point ath=" 50.1083" atv="-25.6690" /><point ath=" 64.9738" atv="-23.5947" /><point ath=" 64.7790" atv=" 19.1507" /><point ath=" 49.6812" atv=" 20.6188" /></hotspot>
    <hotspot name="ext2marine_parade" ath="-130" atv="2" style="hs_button"         onover=""         onhover=""         onout=""         ondown="hs_newxml(marine_parade,../street/daysbay_streets.xml,marine_parade2vanhaldengalley)"         onup=""         onclick=""         flying="0"><point ath="-173.5161" atv="  6.2013" /><point ath="-173.3527" atv="  3.2122" /><point ath="-171.8372" atv=" -1.8197" /><point ath="-151.6087" atv=" -2.6710" /><point ath="-149.0856" atv=" -2.6770" /><point ath="-144.2670" atv=" -2.1776" /><point ath="-119.9450" atv=" -1.8213" /><point ath="-108.0669" atv=" -1.7066" /><point ath="-104.4049" atv=" -3.0232" /><point ath="-92.4310" atv=" -0.0538" /><point ath="-91.9235" atv="  4.1442" /><point ath="-96.8560" atv="  5.8671" /><point ath="-136.2571" atv="  8.9287" /></hotspot>
  • Hi viewinz,

    I suggest:

    • all hotspot keep=false
    • such as Klaus said on the other thread , on the hs() action, change the loadscene: loadscene(%1,null,MERGE,ZOOMBLEND(3,3));


    • MERGE (1.0.7 an higher)

      • merges all settings from the current and the next pano
      • plugins / hotspots / lensflare without keep="true" are removed
      • if there are plugins and hotspots in the new panorama with the same name as the kept ones, the new ones are not loaded
      • this is the recommended setting for new virtual tours


    Salut.

  • viewinz,

    I have watched the action several times and it seems that it does the lookto about 10 degrees then it does exactly 360 around. I can't pick out what does it, just that it seems to do what you want but adds the 360 afterwards.
    BTW, that is some sweet code. Once all the bugs are worked out, that should not take long at all to do a tour. I tried the demo autopano tour software today, it is good for starters but cannot compare to coding like this.

  • Cheers Michel,


    That works great but stops my little planet intro spinning in! Boo! Thanks tho I'll pay with the little planet intro. How did you work that out?


    Jarredja - thanks for having a look and very nice comments, the idea is to get all the complicated stuff working now as actions and hide it in a new krprotected swf so I don't have to look at it anymore!

  • Hi viewinz,

    About the problem on your little planet intro when changing into pier_road_crossing.xml the <view hlookat value from -212.935463 to 147.064537.
    Into lp_intro() action, try to change set(view.hlookat,130); to set(view.hlookat,490); *wink*
    Salut.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!