Operating system or device - Godot version:
Linux (Fedora 26, 64bit) to build apk
Nexus 5 - Android 7.1.1 to run apk
Godot 3-alpha1
Godot 3 (compiled from master)
Issue description:
Project is running on Android in landscape mode even though it was set to run in portrait mode. Orientation does not change if smartphone is rotated. Orientation is not affected by screen-orientation-lock of the smartphone.
Orientation should respect options set in export settings.
Steps to reproduce:
Edit:
It is working for 2.1.3 if the orientation is set to 'portrait' inside the project settings AND the android export settings. But the godot 3 versions are still only landscape.
I had the same issue, I fixed it by setting the orientation to portrait from Project Settings > Display > orientation. Seems like there are a few different settings for orientation and they all need to be in sync. I hope that helps
Never had a problem with that, I never used screen rotation
Thanks @petia-davidova
I was pretty sure I tried that with 2.1.3 but it seems I did not, because now everything works as expected.
But the godot 3 apk is still only running in landscape
I got it to work in Godot 3 by:
Export / Screen / Orientation
to portrait
Project Settings / Display / Window / Handheld / Orientation
to portrait
Had the same issue, my export setting set to portrait
but missing the project setting. It works fine how @robert9g explains.
This has been resolved for a while now.
What is the point of having an orientation setting in two different places? It seems the one in Android export settings is consistently ignored and the one in project settings (which also has more options) is used instead. Whatever is set in the manifest (from export settings) there's a call to set the orientation when the app starts that forces the orientation (from project settings).
Could we just get rid of the one in export settings to make things less confusing?
+1 confusing to have orientation in export settings and project settings( I think it should only be in project settings like how iOS is) Also we need "user" and "fullUser" settings for Android, so user can lock rotation in their android settings. "sensor" ignores the user rotation setting unfortunately. https://developer.android.com/guide/topics/manifest/activity-element
This should go in a new issue, this one has been closed during Godot 3.1 development.
Most helpful comment
I had the same issue, I fixed it by setting the orientation to portrait from Project Settings > Display > orientation. Seems like there are a few different settings for orientation and they all need to be in sync. I hope that helps