M
munkbusiness
Guest
So I am working on an android game. I have a room where I am using the device_get_tilt as the primary controls, but with to big tilt motions the game would flip from landscape to portrait and ruin the game experince. So in order to fix this I used os_lock_orientation(false) when the room starts (in the create event of a obj spawned in the room).
Now the wierd thing is that if the game is running in landscape_flipped, then the entire game gets flipepd upside down when os_lock_orientation is run. Which is unplayable. IDK what to do, is os_lock_orientation hard coded to only have landscape and protrait, and not landscape_flipped and portrait_flipped supported?
I know I can lock my game to only landscape in the game settings, but as I am using both portrait and landscape mode throughout my application, so I need those enabled.
The code I am calling in a create event (the flipped variable is used for controls):
Now the wierd thing is that if the game is running in landscape_flipped, then the entire game gets flipepd upside down when os_lock_orientation is run. Which is unplayable. IDK what to do, is os_lock_orientation hard coded to only have landscape and protrait, and not landscape_flipped and portrait_flipped supported?
I know I can lock my game to only landscape in the game settings, but as I am using both portrait and landscape mode throughout my application, so I need those enabled.
The code I am calling in a create event (the flipped variable is used for controls):
Code:
if(display_get_orientation() == display_landscape) {
os_lock_orientation(true);
flipped = false;
}
else if(display_get_orientation() == display_landscape_flipped) {
os_lock_orientation(true);
flipped = true;
}