• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Android How to lock the device orientation?

M

McBiggity

Guest
I'm currently developing a game for android and the menu system can be used in portrait or landscape and then when the game starts the user is asked to rotate the device to horizontal if not already.

Once the device is rotated to the horizontal position I would like to be able to lock the orientation however I've found no way of doing this and os_lock_orientation doesn't seem to do anything.

Has anyone had experience with this issue or function and know how to accomplish this?
 
M

McBiggity

Guest
Thanks for the replies, I was able to lock the device to landscape orientation however when it locked the orientation would flip 180 degrees. This means when I lock the orientation the game appears upside down and the device has to be rotated this way. Has anyone came across this before?
 
Top