Jump to content

Retain WebVR context after BABYLON.SceneLoader.Append


dsman
 Share

Recommended Posts

How do we continue current webvr camera view inside HMD after loading another model using BABYLON.SceneLoader.Append?

We have a scene, and a button to view in WebVR which works fine. Then there's some WebVR controller based interaction (Oculus controllers) that triggers loading of another model (basically something like teleporting to completely different model) using BABYLON.SceneLoader.Append. 

It just works fine just that Inside Oculus HMD, I see default oculus black screen with small loading graphic in bottom right  (which the other model is being loaded) and then I see black screen forever (after the other model has finished loading). Although if I remove HMD and look at the page, it shows webVR split-screen view. But neither it tracks the HMD (The split screen view doesn't move based on HMD orientation) nor is there any display inside HMD. 

I tried camera.detachControl before calling BABYLON.SceneLoader.Append and camera.attachControl in the success callback of it. 

Link to comment
Share on other sites

The problem is mostly because of how webVR works. We must keep the camera active. And this SHOULD work with Append as it is not changing the activeCamera.

Can you repro in the PG? There must be something else 

Link to comment
Share on other sites

I think this is due to browser behavior of killing VR connection if WebGL app doesn't render a frame for certain period. 

Since BABYLON.SceneLoader is not async, frame freezes in HMD and then it goes black. Actually, it goes black because I have disabled Oculus Client Software exe process using process blocker. Other I see Oculus home after 4-5 seconds. 

I will try to reproduce in PG. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...