Is autorotation in steps possible with krpano?

  • To me, autorotation around 360 degrees add the same speed with not hesitation feel unnatural. It seems more natural to look in a direction and take in what's in you field of view then shift to take in the next view. Is there a way to set auto panning to remain in one position for a set number of seconds then move a set number of degrees in a set number of seconds? For example. the view could remain stationary for 5 seconds then move 60 degrees in one second then repeat the process 5 more time to complete the 360.

  • Hi,

    yes, there a several possibilities to do such,
    by using the xml scripting and the onidle event you can define many automatic movements for this case,

    e.g. this here would be a small and simple code with random looking around (just copy it as it is into the xml)

    Code
    <krpano idletime="2.0" />
    <events onidle="mul(h,random,360);mul(v,random,90);mul(f,random,90);sub(h,180);sub(v,45);add(f,45);oninterrupt(break);lookto(get(h),get(v),get(f),smooth(5,2,50));wait(2.0);" />

    idletime="2.0" - sets the time without user-interaction before the onidle event should start,

    then in the onidle event there will be three variables (h,v,f) calculated by random value:
    h = random * 360 - 180 (this is the horizontal destination looking position)
    v = random * 90 - 45 (this is the vertical destination looking position)
    f = random * 90 + 45 (this is the destination field of view)

    then with:
    oninterrupt(break);
    lookto(get(h),get(v),get(f),smooth(5,2,50));
    wait(2.0);

    a user-interrupting possibility was defined,
    then by calling lookto() the view moved to the calculated position (speed and acceleration by the 'smooth' settings),
    and when the lookto() is done, wait additionally 2.0 seconds

    here an online example how that code would behave: (the code was passed here directly as parameter)
    https://krpano.com/krpano.html?pa…2,50));wait(5);

    also search the forum for "autotour" for similar automatic movement code,

    best regards,
    Klaus

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!