How do I make the game to change his orientation?

0 favourites
  • 4 posts
From the Asset Store
Simplistic hyper-casual game with nature elements. Tap to switch between the 4 elements and reach a better score.
  • Hi, my english is not the best so bear with me.

    First my game is made to be played on portrait and im trying to change screen orientation to landscape when i touch a button.

    Im doing this to show rewarded videos from chartboost in landscape mode instead of portrait, resulting in the video to fill the entire screen without the huge black bars that appear when you try to watch the video in portrait.

    This is exactly what im trying to copy: https://vid.me/ecF9

    The game from the example is locked on portrait but when you press the video button, the screen rotates so the video can be seen on landscape. After the video ends the screen rotates again to portrait.

    My project settings: http://prntscr.com/cwvb5s

    By the way i use CocoonJS to compile my games and of course i also use their navigator (Canvas+)

    If anyone can give me some help, it would be greatly appreciated.

    Thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Anyone?

  • Hmm, wonder why no one answered..I'm wondering how to do the same thing. I guess I'll keep trying to figure it out

  • you can't switch between landscape and portrait via events system

    however you can resize the layout and make it for portrait and landscape when you want.

    but i think youl need to lock the orientation to any, not sure how well all this will come in place... probably not as good as is expected, maybe a custom plugin will help with this. i know this was requested long time ago, maybe such plugin already exists. cordova plugin or something similar that let you access the orientation locking attribute.

    but im not sure.

    Hmm, wonder why no one answered.....

    probably cause they are in recovery from the most epic drinking? or still celebrating?

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