Jump to content

DeviceOrientationCamera help


Recommended Posts

On 4/16/2016 at 0:13 PM, Deltakosh said:

Hum...it should not move the position :)

Can you share the code you are using in the playground?

Here you go David. http://www.babylonjs-playground.com/#1KVSS8#1

So I'm looking to have a camera that responds to the device's orientation as well as magnetometer in a stationary position. So my starting place was to use the DeviceOrientationCamera, but it is giving me unexpected results. I pretty much want to simulate a 360 experience, and toggle in and out of VR mode that has the same functionality.

Thank you!

Link to comment
Share on other sites

Actually it should move :D

I'm just stupid


Here is the code you may want to check: https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/Inputs/babylon.freecamera.input.deviceorientation.ts#L43


The idea could be to inherit from deviceOrientationCamera and override the checkINput function to remove this line:



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.

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.


  • Recently Browsing   0 members

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