mirror of
https://github.com/stan220/godot-docs.git
synced 2026-09-09 01:29:02 +00:00
Fix Orientation on Android
Following the Android instructions for exporting, results in an rotatet build. By specifying the Orientation option in the "Project Settings" solves this bug.
This commit is contained in:
@@ -38,8 +38,11 @@ in the "Project Settings" under *Input Devices* and *Pointing*
|
||||
Before we change the input method, in the project settings go to *Display*,
|
||||
then click on *Window*. In the *Stretch* options, set *Mode* to "2d" and *Aspect* to
|
||||
"keep". This ensures that the game scales consistently on different sized screens.
|
||||
|
||||
Since we are already in the *Window* settings, we should also set under *Handheld*
|
||||
the *Orientation* to "portrait".
|
||||
|
||||
.. image:: img/export_stretchsettings.png
|
||||
.. image:: img/export_handheld_stretchsettings.png
|
||||
|
||||
Next, we need to modify the ``Player.gd`` script to change the input method.
|
||||
We'll remove the key inputs and make the player move towards a "target" that's
|
||||
@@ -222,7 +225,8 @@ your system and the location of the keystore you just created.
|
||||
.. image:: img/export_editor_android_settings.png
|
||||
|
||||
Now you're ready to export. Click on *Project -> Export* and add a preset
|
||||
for Android (see above).
|
||||
for Android (see above). Select the Android Presets and under *Options* go to
|
||||
*Screen* and set *Orientation* to "Portrait".
|
||||
|
||||
Click the "Export Project" button and Godot will build an APK you can download
|
||||
on your device. To do this on the command line, use the following:
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 61 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 20 KiB |
Reference in New Issue
Block a user