Switch to Next pano while navigating ?

  • Is there a way to transition to the next pano while navigating with W,A,S,D keys. The idea is that stead of clicking on hot spots the user could switch to the next pano in the direction we are navigating.

    Guillemro,

  • Hi,

    You can use keycode to do this. https://krpano.com/docu/actions/#keycode

    Create an event and an action something like this:

    Code
    <events onkeydown="checkkey();" />
    	<action name="checkkey">	
    trace('keycode=', keycode);
    if(keycode == 78, skin_nextscene_loop(+1));	
    if(keycode == 80, skin_nextscene_loop(-1));
    </action>


    78 is the keycode for "n" or next and 80 is the keycode for "p" or previous. http://keycodes.atjayjo.com/#charcode

    Hope this helps.

    Rich

  • Thanks Lastwolf,

    But this will just move to the next pano, What I want is to automatically switch to the next pano depending on the direction the user is navigating, Like this example by everpano

    look at the very bottom of the page.
    https://everpano.com/navigator_plugin.php


    In fact this example has the 2 things I want to accomplish, the directional switching of panos and the limit of the camera so you don't run trough walls.
    Unfortunately that plugin in just works with everpano.

Participate now!

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