Jump to content

GetOrientation () returns only 0


SpiderPig
 Share

Recommended Posts

This may be a dumb question; but with mobile, how to rotate the game depending on which way you hold the phone? Should it be automatic or is it programmable by using "GetOrientation()"? if so, I've printed the results of "GetOrientation()" and it returns 0 regardless of pone orientation.

Link to comment
Share on other sites

I'll have to check tomorrow when I get in, but I believe there is a Device::SetOrientation() function that sets allowed orientations. You can specify both with a bitwise flag, but you should't ever do this on Android: Landscape|Portrait. Android will recreate the GL context and reload all graphics assets any time the screen orientation changes if you do that.

My job is to make tools you love, with the features you want, and performance you can't live without.

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.

 Share

×
×
  • Create New...