Sie sind nicht angemeldet.

gputhige

Schüler

  • »gputhige« ist der Autor dieses Themas

Beiträge: 53

Wohnort: Bangalore, India

Beruf: 3D Studio

  • Nachricht senden

1

Freitag, 20. Mai 2016, 14:08

Passing Current Scene hlootat, vlookat values to next scene

Hi
Can someone help me with this:
When the viewer clicks the hotspot to move to the next scene, I wish to capture the hlookat, vlookat values of the current scene and pass it on to the linkedscene so that I can align the next scene to the current view.

Rgds
GP

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

2

Freitag, 20. Mai 2016, 14:21

Why not simply use KEEPVIEW during loadpano call?

http://krpano.com/docu/actions/#loadpano
Regards,

Alexey

gputhige

Schüler

  • »gputhige« ist der Autor dieses Themas

Beiträge: 53

Wohnort: Bangalore, India

Beruf: 3D Studio

  • Nachricht senden

3

Freitag, 20. Mai 2016, 14:40

Thanks Alexey,
But in some cases, I noticed that I might have to off-set the hlookat value. That is adding or reducing the hlookat to match the next scene.

4

Mittwoch, 25. Mai 2016, 10:29

Hi,

you could:
  • use KEEPVIEW and then directly after the loadscene() call add the offset to the current view.hlookat:

    Quellcode

    1
    2
    
    loadscene(..., null, MERGE|KEEPVIEW, ...);
    add(view.hlookat, YOUR_OFFSET);

  • save the current lookat values, load the scene, load the previously stored values and set them with an offset:

    Quellcode

    1
    2
    3
    4
    
    copy(cur_hlookat, view.hlookat);
    copy(cur_vlookat, view.vlookat);
    loadscene(...);
    lookat(calc(cur_hlookat + YOUR_OFFSET), get(cur_vlookat));

  • use KEEPVIEW and adjust/rotate the the pano image itself by the prealign setting to match the direction:

    Quellcode

    1
    
    <image ... prealign="0|YOUR_OFFSET|0">


Best regards,
Klaus

gputhige

Schüler

  • »gputhige« ist der Autor dieses Themas

Beiträge: 53

Wohnort: Bangalore, India

Beruf: 3D Studio

  • Nachricht senden

5

Mittwoch, 25. Mai 2016, 13:45

Thanks Klaus
will try this.

Rgds
GP