babbleon Posted October 15, 2018 Share Posted October 15, 2018 Hello, Do we have something like DeviceOrientationCamera, but when the device is moved: the camera moves and the 'look at' position stays the sames as opposed to the camera position staying the same and the 'look at' position moving? I'd imagine if it existed it would be called DeviceArcRotateCamera. ? Hope this make sense! Thank you. Quote Link to comment Share on other sites More sharing options...
babbleon Posted October 15, 2018 Author Share Posted October 15, 2018 This works: var camera = new BABYLON.VRDeviceOrientationArcRotateCamera('Camera', 0, 0, 5, new BABYLON.Vector3(0, .3, 0), scene); camera.cameraRigMode = 0; However, when i rotate my device, the BJS camera seems to rotate the opposite way. Quote Link to comment Share on other sites More sharing options...
Guest Posted October 15, 2018 Share Posted October 15, 2018 Hello! this camera extends the ArcRotateCamera and then use this inputManager: http://doc.babylonjs.com/api/classes/babylon.arcrotatecameravrdeviceorientationinput You can use the xxxCorrection properties and set then to -1 to change the direction A doc about inputs: http://doc.babylonjs.com/how_to/customizing_camera_inputs babbleon 1 Quote Link to comment Share on other sites More sharing options...
babbleon Posted October 15, 2018 Author Share Posted October 15, 2018 Cheers @Deltakosh, will check it out this evening. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
babbleon Posted October 15, 2018 Author Share Posted October 15, 2018 Hi @Deltakosh, I have tried the below, but regardless of what I set xxxCorrection to it makes to difference to the movement of the camera when I move by device around. var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0, 5, new BABYLON.Vector3(0, .3, 0), scene); camera.inputs.add(new BABYLON.ArcRotateCameraVRDeviceOrientationInput()); camera.inputs.attached.VRDeviceOrientation.alphaCorrection = -1; camera.inputs.attached.VRDeviceOrientation.betaCorrection = -1; camera.inputs.attached.VRDeviceOrientation.gammaCorrection = -1; Am I doing something obviously wrong? Quote Link to comment Share on other sites More sharing options...
Guest Posted October 15, 2018 Share Posted October 15, 2018 Nope you are good It is just a bug in the engine I'll fix it for next commit Quote Link to comment Share on other sites More sharing options...
babbleon Posted October 16, 2018 Author Share Posted October 16, 2018 Super stuff.. thank you - all fine now. 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.