davrous

BabylonJS Mansion in WebVR

Recommended Posts

Hello,

I'm having fun while writing our next big tutorial on building WebVR scene with Babylon v3. :)

Here's a preview of what I'm working on. The Mansion scene is really a great experience in VR!

 

You can use the VR controllers to teleport, it sends a yellow ray by default. If the ray turns blue, it means you're pointing to an actionable item (using our Action Manager). Pressing the VR controller button will run the action on it, most of the time an animation + sound like in the regular version of Mansion: http://www.babylonjs.com/demos/mansion 

Enjoy!

David

Share this post


Link to post
Share on other sites

Oh WOW!  That is very cool.  I'm excited to get BabylonJS working on more low end devices like Gear VR and cardboard.  Many people these days don't even have a PC.  Looking forward to seeing what you come up with :)

Share this post


Link to post
Share on other sites

I do confirm Babylon.js works great in WebVR in GearVR. To make it work, you absolutely need a button to click to enter VR. As my demos on my tutorial are using the click on the canvas, they don't work for now. I'll update them.

I've also fix a small bug on the web audio side which now enables Sponza VR to work in Gear VR. Still, even on a S8, it's very choppy. The scene is too complex for the Gear to render in VR. Maybe if I'm lowering down the resolution it could work much better.

Share this post


Link to post
Share on other sites

Here's a first sample using our new VR helper: http://www.babylonjs-playground.com/#IHY77X#16

Using this single line of code:

scene.createDefaultVRExperience();


It will create a VR button at the bottom right on the rendering canvas, will create a default deviceorientation camera. So moving your phone around before switching to VR will let you explore in 360 already.

Clicking on the button will check for WebVR compatibility + a headset connected. If WebVR ready -> switching to WebVR otherwise, fallback to VRDeviceOrientation camera.

I've just tested on my iPhone and Samsung GearVR and it works very well :D

 

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.