Jump to content

DeviceOrientationCamera rotation?


tbgeorge
 Share

Recommended Posts

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?

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.

Guest
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.

Loading...
 Share

  • Recently Browsing   0 members

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