tbgeorge Posted May 19, 2016 Share Posted May 19, 2016 Hey all, I'm trying to get the rotation of a DeviceOrientationCamera in the same way I get it from a FreeCamera by saying var camera = new BABYLON.FreeCamera("freeCam", BABYLON.Vector3.Zero(), scene); // var camera = new BABYLON.DeviceOrientationCamera("deviceCam", BABYLON.Vector3.Zero(), scene); var rot = camera.rotation; but this doesn't work. If I move the FreeCamera around with my mouse, the rotation is updated and constantly changing while I'm moving the mouse, but the DeviceOrientationCamera doesn't update the rotation variable when I view it on my cell phone. Is there a different way to get the camera's rotation that I'm missing? Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted May 19, 2016 Share Posted May 19, 2016 DeviceOrientationCamera uses the camera.rotationQuaternion property, if I read the recent PR right. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 19, 2016 Share Posted May 19, 2016 This is correct 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.