You are not logged in.

1

Tuesday, May 19th 2015, 2:46pm

unload scene

I plan the following scenario of panaroma user interact:

1. loading pano
2. navigating (changing view)
3. loading scene
4. maybe loading second scene...
5. return to the pano that was left in the point of 2.


The view that was left before loading scene should not be changed.


So i cannot resolve the point of 2: how to return to the pano and view that were left before loading scenes.
Any ideas?


Thank you

benji33

Intermediate

Posts: 244

Location: France

Occupation: Senior Software engineer

  • Send private message

2

Tuesday, May 19th 2015, 3:13pm

You can save each hlookat, vlookat, fov, ... values before leaving a scene into an array linked to the scene name and use these values if exists when you go back to the scene.

Example : usage of arrays into the webvr.xml file.

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<vrheadsets>
  <headset name="cb1" caption="Cardboard A"   fov="96.0"  dist="0.60" vig="100" overlap="1.0" />
  <headset name="cb2" caption="Cardboard B"   fov="96.0"  dist="1.00" vig="100" overlap="1.1" />
  <headset name="gvr" caption="GearVR"    	fov="112.0" dist="0.95" vig="100" overlap="1.0" />
  <headset name="one" caption="VR ONE"    	fov="179.0" dist="5.00" vig="53"  overlap="1.0" />
  <headset name="hom" caption="HOMiDO"    	fov="101.0" dist="1.10" vig="70"  overlap="1.0" />
  <headset name="ccr" caption="ColorCross VR" fov="70.0"  dist="0.65" vig="100" overlap="1.0" />
</vrheadsets>

<action name="myaction">
<!-- start of action -->
for(set(i,0), i LT vrheadsets.headset.count, inc(i),
  copy(hs, vrheadsets.headset[get(i)]);
  if(i_fov == hs.fov AND i_dist == hs.dist AND i_vig == hs.vig AND i_overlap == hs.overlap, copy(i_headset, hs.caption));
);
<!-- end of action -->
</action>

3

Wednesday, June 17th 2015, 4:21am

Thank you for your advise, benji33. I have implemented the way of saving view variables and restoring them after all.