automatic scene loading after full rotation

  • Hi
    I try to make tour with auto loading scenes. I find a solution :

    Code
    <action name="scene_1_start">
    			set(ath, get(view.hlookat));
    			 inc(ath, 360);
    			  lookto(get(ath),0, 90, 5);
    			  loadscene(scene_next);
    		</action>

    but it don't work for me.

    I have this before action :

    Code
    <scene name="scene_1" title="1" onstart="scene_1_start();">
    		<view hlookat="0" vlookat="0" fovtype="MFOV" fov="95" fovmin="45" fovmax="120" />

    and I think the problem is in it, but I can't fix it.

  • try this. i hope that is what you want:

    Code
    <action name="scene_1_start">
    			tween(view.hlookat, 360, 20, linear, loadscene(scene_2); );		
    </action>

    your problem is, that there is no incremental rotation. you set the hlookat directly to 360. after this you try to load "scene_next". is "scene_next" correctly defined with the name of the scene to load?

    I hope I could help

  • I don't understand how to set movement in scene.
    when scene is load:

    Code
    <scene name="scene_4" title="scene4" onstart="">
    		<view hlookat="180" vlookat="0" fovtype="MFOV" fov="95" fovmin="45" fovmax="120" />


    it start ok, but what when I want to start from another point ?
    when I change hlookat to ex 90 I will have move before auto rotation start, why ?

    here is my sample scene (every scene is analogous):

    suggested solution from post before don't work for me.

  • Should be very easy to solve using a variable and a add-routine.

    - create a variable with the value of the current hlookat
    set(dummy1,get(hlookat));

    - add 360 to dummy1
    add(dummy2,get(dummy1),360);

    check with an event if current hlookat is equal to dummy2 and start an action to load the next scene.

    Should work *wink*

    Best regards
    Nupsi

  • thanks for replay. I am new in krpano and I have many problems, flash panorama player it very different :)
    so everything should look like that ?:

    Code
    set(dummy1,get(hlookat));
    add(dummy2,get(dummy1),360);
    
    
    <events name="nestScene" keep="false" 
    			if (get(hlookat) == dummy2, loadscene(scene_2));
    />

    this code don't work but I don't know why.
    and it should be in a concrete scene ?

    thanks for help and patience

  • something like this would work.

    remember, lookto has a parameter, shortestway. If set to false, it will take the long route. So if your hlookat = 0, and you set the lookto to 360, it will take the long way.

  • Hi Zephyr,

    I have tried below code but not able to call "load_next_scene()". Is there any other way to call action once 360 degree rotation is completed.

    Code
    lookto(360,0, , smooth(20,20,20), false, false, load_next_scene());

    Thanks
    pratiks

Jetzt mitmachen!

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