Hi all !
I set up the screen orientation to sensor in the project settings (Display > Window > Handled > Orientation).
When I'm executing my game on a mobile device, I want to switch the layout according to this orientation.
orientation = OS.screen_orientation
print ("SCREEN: " + str(orientation))
var new_layout = null
match orientation:
But orientation always returns "6" which is "SENSOR". I'm not able to retrieve Portrait or Landscape.
How to do so ?
Many thanks.