controling orientation change

Greetings

you have a mobile device your rotating around from landscape to portrait, if their is a problem which requires the game to delay in rotating around, is their a way to get the device to wait while this is occuring?

most of the time for me this is not even a problem but due to a bug i cant wrap my head around let alone prevent sometimes i need the game to wait until its settled before a switch happens, but if the rotate happens while everything is moving the device will do its rotate and the game will end up warpped for a few seconds until the board is stable, then the game will correct itself as i designed it to.

all i would like to do is prevent the machine from rotating until the game is ready to do so, is their any way to acomplish this?

thank you.
 
One way could be to program the rotation yourself. In global game settings, you could lock it to just portrait. Then detect when device_get_tilt_x() is close to 1 or -1 and execute code that rotates the screen. And rotate it back when device_get_tilt_x() is close to 0
 
this sounds like a great solution the only thing i worry about is how emulators will respond to this when the device cant tile and how doing this will effect how the aso system will view the game with their "made for tablet" or "made for phone" endorsements since from what i gather they normally make that determination purely off if those boxes are checked.

or could i simply not understand this, i mean if the emulator can send back that tilt information and i just send the store an email explaining then all might be well.

thank you for the command code. :)
 
Top