FlashyGoblin Posted April 15, 2016 Share Posted April 15, 2016 When using the DeviceOrientationCamera, the orientation of the device actually moves the camera's position. Is there a way to disable that and only allow for the device orientation to update the camera's rotation? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 16, 2016 Share Posted April 16, 2016 Hum...it should not move the position Can you share the code you are using in the playground? Quote Link to comment Share on other sites More sharing options...
FlashyGoblin Posted April 19, 2016 Author Share Posted April 19, 2016 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! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 19, 2016 Share Posted April 19, 2016 Actually it should move 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: https://github.com/BabylonJS/Babylon.js/blob/master/src/Cameras/Inputs/babylon.freecamera.input.deviceorientation.ts#L71 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.