Jump to content

DeviceOrientationCamera - Initial camera direction - Landscape VS Portrait


Recommended Posts

Hey there, I noticed that the DeviceOrientationCamera start direction is different when the users device is in portrait vs landscape mode.
Portrait is correct, where as Landscape is off to the right when compared to other cameras. 

Is there any way I can sync these two up without moving objects in my scene?

The same issue occurs with VRDeviceOrientationFreeCamera.

Sidenote: I did see resetToCurrentRotation() in babylon 2.5 but it doesnt resolve this issue.


Link to comment
Share on other sites

hiya @re_evolutn!

I am pretty sure the rotation is accurate, as it is used in production and works. But! I have been known to make mistakes. Often than I would have hoped.

The thing with the resetToCurrentRotation is, that it first needs to get some information from the device (the first rotation) in order for it to work correctly. Otherwise, you are resetting nothing to nothing.

A quick test would be - calling resetToCurrentRotation() 1 second after the scene already renders. See if it helps, and let me know if it doesn't. Would be great to see some code as well!


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.

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.


  • Recently Browsing   0 members

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