How to keep plugins,hotspots clickable while running "moveto" action?

  • Hello,

    I am not sure if this is discussed before.. Is there a way to keep plugins,
    hotspots clickable while running "moveto" action? (or other similar actions?)

    I have made an autotour function which keeps on moving from one panorama
    to another and I wish to provide "stop autotour" button, which is clickable,
    so the user can click this button during autotour.
    At the moment I am using "oninterrupt" function so no problem stopping
    autotour -> the user just click anywhere on the panorama and the autotour
    stops. But I wish to provide "stop autotour" button which is clickable and
    actually works when the user clicks on this button.

    Pelase refer to this "autoDrive" button.
    http://www.everyscape.com/eats/1729/chee…on-boston-02108

    -> this button (and also other buttons) is clickable during autoDrive.

    Any idea how to accomplish this with krpano api?

    thank you in advance for your reply!

    hyung

  • Hi Klaus,

    I have testing the "lookto" action but I am having a problem. Please refer
    to my following action:


    Code
    lookto( 0, 0, get(view.fov),smooth(320,-320,70),true,true,customAction() );


    while running "lookto" action, I wish to allow users to break the lookto action when clicking
    anywhere on the panorama. (same as oninterrupt(break) action)

    But this doesn't work as I have expected. When I run this code, the plugins/hotspots buttons
    are clickable but I can't stop the lookto action. I have tried to put the oninterrupt action before
    the lookto action but still the same. The oninterrupt action doesn't work at all in this case.

    Code
    oninterrupt( customBreak() );
    		lookto( 0, 0, get(view.fov),smooth(320,-320,70),true,true,customAction() );


    Can you help me with this Klaus? What I want to do is while running "lookto" action is
    - keep the plugin/hotspot buttons clickable
    - break the "lookto" action when the user clicks anywhere on the panorama
    (same as "oninterrupt(break)" )

    How do I accomplish this?

    Best Regards,
    hyung

  • Hi Jarredja,

    Both with ; and without ; do not work. Even the default break action doesn't
    work with this code.

    Code
    oninterrupt( break );lookto( 0, 0, get(view.fov),smooth(320,-320,70),true,true,customAction() );


    still no idea why *confused*

    hyung

  • yes I have an example.


    http://115.68.23.139/biz/autoplay/
    (You can download the source from here - http://115.68.23.139/biz/autoplay/autoplay.zip)

    Please ignore the "autoplay" button (it's not working correctly at the moment)
    If you unzip the zip file, go to xml -> web_thumb -> config.xml and refer to the

    "loadTo" action.


    Code
    oninterrupt( js(alert('oninterrupt')) );		lookto(%2,%3,get(view.fov),smooth(320,-320,10),true,true,loadNewPano(%1,%4,%5));


    If you click the red arrow button, the panorama looks to ("lookto" action) the certain point.
    And while moving to that point, the plugin/hotspot buttons are clickable but the oninterrupt
    action is not called when I click on the panorama. (sometimes oninterrupt is called after
    the new panorama is loaded)

    The krpano version is the latest. (which I have downloaded two days ago)

    Any idea?

    hyung

  • Hello,

    Thanks in advance to anyone who responds.

    What I'm looking to do is, when a user is panning and reaches a certain point (or more accurately is in a certain horizontal degree range) that the camera pans towards a point of interest.

    The effect I'm looking for is that some spots are almost a little magnetic and are pulling the camera towards it when the user gets near it. I'd also like to have the user retain control during this process.

    I think it can be done with an IF statement that calls a lookto with nonblocking set to true.

    Like this:

    Code
    <action name="magnet">
    		  if(view.hlookat GT 35, if(view.hlookat LT 145, lookto(184,35,120,linear(20),true, true));
    		  );
    	</action>

    Unfortunately, this doesn't seem to have any effect so I must be doing something wrong.

    Any help with this would be greatly appreciated.

    Thanks.

    Roger

  • Hello all,

    I'm assuming - and hoping - everyone was out enjoying the nice weather to much on the weekend to be doing any pano coding.

    Unfortunately, I'm under a bit of a time constraint on figuring out this idea of slightly magnetic spots in a panorama. I'm not looking for someone to provide me a complete solution, just a bit of help down the right path.

    Actually, I if someone does have a complete solution for me, I would be willing to pay a reasonable amount but I'm really looking to have this wrapped up in the next day or two.

    I should also mention that I have mousefollow enabled but I'm not having success when I disable it either.

    Thanks in advance to anyone who responds.

    Roger

  • Hi,

    here a quick try:

    Parameters of the magnetic actions - magnetic(90, 0, 45, 0.025):
    1. Parameter - h position of the 'magnet'
    2. Parameter - v position of the 'magnet'
    3. Parameter - range of the magnet
    4. Parameter - 'strongness' of the magnet

    Best regards,
    Klaus

Participate now!

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