• Hey! Guest! The 37th GMC Jam will take place between May 28th, 12:00 UTC and June 1st, 12:00 UTC. Why not join in! Click here to find out more!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Android / Amazon Fire Change Device Orientation?

Raonak

Member
Hi, i'm developing a game for android, and am wondering if there's any way to change the device orientation?

I know you can uncheck orientations in the configuration menu... but my game supports both landscape and portrait, and in the case where the user has locked the orientation through the OS, is there a way to grammatically change the orientation?

e.g. User has locked the phone orientation to portrait, but wants to play the game in landscape.

is there some equivalent of os_set_orientation()?
 

Greenwitch

Member
Landscape is just 'portrait' but rotated. To set a mobile game landscape, you just treat portrait as if it was landscape and just draw your game in that manner, a.k.a simply rotated to whichever side you want it at. You'd then make your own function that acts as a 'switch' between these modes.
 

Raonak

Member
Cool, i think i can manage that with view rotate. But do you know if there's any way of changing gui rotation? That's gonna be the hard part...
 
Top