angeltrickz Posted June 1, 2018 Share Posted June 1, 2018 var camera = new BABYLON.VRDeviceOrientationFreeCamera ("Camera", new BABYLON.Vector3 (-6.7, 1.2, -1.3), scene, 0); camera.attachControl(canvas, false); console.log(camera.inputs.attached) camera.inputs.attached.deviceOrientation.detachControl(canvas); var onOrientationEvent = function(evt) { this._alpha = (+evt.alpha | 0) + 45; this._beta = (+evt.beta | 0) + 45; this._gamma = +evt.gamma | 0; this._dirty = true; } camera.inputs.attached.deviceOrientation._deviceOrientationHandler = onOrientationEvent.bind(camera.inputs.attached.VRDeviceOrientation); camera.inputs.attached.deviceOrientation.attachControl(canvas); scene.activeCamera = camera; A few years ago I was working with a webvr project and this code worked for me with a cell phone but now it does not work and I searched for more vr methods in babylon, but none works as before the movement of the phone .. Quote Link to comment Share on other sites More sharing options...
Guest Posted June 1, 2018 Share Posted June 1, 2018 Hello...can you provide a repro in the PG? If there is a bug we will fix it right away! Wingnut 1 Quote Link to comment Share on other sites More sharing options...
angeltrickz Posted June 6, 2018 Author Share Posted June 6, 2018 thanks but I already solved the problem: P Quote Link to comment Share on other sites More sharing options...
Guest Posted June 6, 2018 Share Posted June 6, 2018 ok cool 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.