How do I Change Orientation manually in Android game?

0 favourites
  • 5 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Hello

    I want to switch the game from Landscape to portrait at specific moments.

    Choosing "Any" in project properties will allow the user to change orientation however he wants. Choosing "Portrait"/"Landscape" will lock the app to this orientation forever.

    I want to control orientation from the game.

    I have tried almost all combinations of the Browser:Lock/Unlock orientation, but always the above result.

    The game is exported as Android or iOS.

  • If you need to temporary switch orientation to show something simple (like a splashcreen), you can fake it - rotate all graphics on the layout or the layout itself by 90 degrees.

  • If you need to temporary switch orientation to show something simple (like a splashcreen), you can fake it - rotate all graphics on the layout or the layout itself by 90 degrees.

    Thank you. Unfortunately, this section is a bit complex to use this method :\</p>

  • My working solution (for iOS or Android):

    + Set Orientations in Properties to Any

    + Add Browser-Plugin

    + Add Action on game start: Browser -> Lock Orientation to ... (what you need)

    + Done!

    You can change the orientations at runtime.

    EDIT: You don't need this Plugin:

    construct.net/en/make-games/addons/311/cordova-screenlock-c3-runtime

    .. but you can use it instead of the browser plugin.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • My working solution (for iOS or Android):

    + Set Orientations in Properties to Any

    + Add Browser-Plugin

    + Add Action on game start: Browser -> Lock Orientation to ... (what you need)

    + Done!

    You can change the orientations at runtime.

    EDIT: You don't need this Plugin:

    https://www.construct.net/en/make-games/addons/311/cordova-screenlock-c3-runtime

    .. but you can use it instead of the browser plugin.

    Thank you.

    The plugin worked great! Is there a C2-compatible version, please?

    The browser method is what I have been doing from the start. I tried it again and it didn't work on Android.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)