How do I make the game to change his orientation?

Get help using Construct 2

Post » Thu Oct 20, 2016 9:45 pm

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.
B
19
S
7
G
2
Posts: 13
Reputation: 2,300

Post » Sat Oct 22, 2016 12:44 am

Anyone?
B
19
S
7
G
2
Posts: 13
Reputation: 2,300

Post » Mon Jan 02, 2017 4:43 am

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
B
21
S
6
Posts: 58
Reputation: 1,385

Post » Mon Jan 02, 2017 5:23 am

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.


lovjc7 wrote:Hmm, wonder why no one answered.....



probably cause they are in recovery from the most epic drinking? or still celebrating?
B
75
S
22
G
68
Posts: 1,336
Reputation: 43,269


Return to How do I....?

Who is online

Users browsing this forum: brunopalermo, plinkie, rayolf and 10 guests