Is there a way to find the orientation of a screen ?(portrait or landscape)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By igbow

OS.screen_orientation return the same value all the time
I know that I can use the changing width to detect the change of orientation (OS.window_size) I’m wondering tho if there is something easier.

:bust_in_silhouette: Reply From: jgodfrey

I’d expect OS.screen_orientation to be the correct way to detect screen orientation. And, though I haven’t tested it, I’d expect its return value to change appropriately when the device orientation changes. Are you sure that’s not the case? If so, what device are you working with?

Thank you for the response :slight_smile:
But it is a know issue, Calinou said it will be fix in 3.2.4 beta 2
OS.get_screen_orientation() returns LANDSCAPE, although project is set to PORTRAIT on android. · Issue #17109 · godotengine/godot · GitHub

igbow | 2020-11-15 23:38

Ah, good to know. Thanks for the follow-up.

jgodfrey | 2020-11-16 00:19