Jump to content

Babylon + VR


OMAR
 Share

Recommended Posts

Hi guys,

so I've just got myself a new google cardboard (yeay :D ) and now I'm testing it with Babylon.js. I created this "dull" demo scene just to test how this VR stuff works.

Now the problem is that my  VRDeviceOrientationFreeCamera doesn't really respond to device input (it's supposed to respond to device orientation isn't it?)

Can somebody explain what's going on here? Thanks...

Btw I'm using xperia compact z3

 

Edit: I'm also experiencing some rendering issues. For example the PG provided above shows 2 cubes side-by-side instead of showing only one. 

Link to comment
Share on other sites

Hi,

You forgot to bind and reattach  the inputs to the camera.

camera.inputs.attached.VRDeviceOrientation._deviceOrientationHandler = onOrientationEvent.bind(camera.inputs.attached.VRDeviceOrientation);
camera.inputs.attached.VRDeviceOrientation.attachControl(canvas);

Here is you playground updated : http://www.babylonjs-playground.com/#IGIJC#3

I hope you will see your cube moving

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...