Browse Source

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.
flofriday 5 years ago
parent
commit
7c079bf721

+ 6 - 2
getting_started/step_by_step/exporting.rst

@@ -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*,
 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 
 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.
 "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.
 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
 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
 .. image:: img/export_editor_android_settings.png
 
 
 Now you're ready to export. Click on *Project -> Export* and add a preset
 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
 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:
 on your device. To do this on the command line, use the following:

BIN
getting_started/step_by_step/img/export_handheld_stretchsettings.png


BIN
getting_started/step_by_step/img/export_stretchsettings.png