SpiderPig Posted March 6, 2013 Posted March 6, 2013 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. Quote
Josh Posted March 6, 2013 Posted March 6, 2013 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. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
SpiderPig Posted March 6, 2013 Author Posted March 6, 2013 Okay, so if I'm understanding this correctly, GetOrientation() doesn't detect which way the user is holding their device... that would be the job of the accelerometer, yes? Quote
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.