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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.