How do I disable auto-rotate on android?

Just started using Construct 2? Post your questions here

Post » Thu Jan 14, 2016 2:29 pm

I'm using XDK and I can force portrait, but I can't figure out how to disable auto-rotate. If it rotates with the force portrait setting (via C2 layout properties, browser plugin and even third-party plugin for XDK) the game rotates to landscape with the game in the centre with huge bars either side. Any ideas how to disable auto-rotate?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Fri Jan 15, 2016 5:35 pm

You need to select portrait in the build settings of XDK.
"If you don't build your dream, someone else will hire you to build theirs"
B
12
S
3
G
1
Posts: 53
Reputation: 905

Post » Fri Jan 15, 2016 5:36 pm

Construct 2, properties, and you can set Orientation Lanscape or Potrait only (default "any") it's help?
B
11
S
2
G
1
Posts: 13
Reputation: 825

Post » Fri Jan 15, 2016 5:38 pm

I did that but the screen still rotates, I can confirm that other apps from the store can lock my screen, but XDK isn't doing it right :/
Last edited by Zebbi on Sun Jan 17, 2016 1:40 pm, edited 1 time in total.
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Sat Jan 16, 2016 4:24 pm

rickyandrean wrote:Construct 2, properties, and you can set Orientation Lanscape or Potrait only (default "any") it's help?

VValt wrote:You need to select portrait in the build settings of XDK.

I tried both these and added the screen orientation plugin, but it still twists the screen so there's black bars either side (I'm mentioning this so you know it's not turning my game widescreen, it's just not locking the orientation).
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Sat Jan 16, 2016 5:35 pm

Zebbi wrote:
rickyandrean wrote:Construct 2, properties, and you can set Orientation Lanscape or Potrait only (default "any") it's help?

VValt wrote:You need to select portrait in the build settings of XDK.

I tried both these and added the screen orientation plugin, but it still twists the screen so there's black bars either side (I'm mentioning this so you know it's not turning my game widescreen, it's just not locking the orientation).

If you built it for Crosswalk, did you make sure you changed the tab of build settings to 'Android (crosswalk)' and didn't accidentally set things up for normal Android build? That tab is open by default and I sometimes accidentally set things up there.

If you still can't get it to work, you should probably ask about it at the XDK forums as well:
https://software.intel.com/en-us/forums/intel-xdk
"If you don't build your dream, someone else will hire you to build theirs"
B
12
S
3
G
1
Posts: 53
Reputation: 905

Post » Sat Jan 16, 2016 6:26 pm

VValt wrote:
Zebbi wrote:
rickyandrean wrote:Construct 2, properties, and you can set Orientation Lanscape or Potrait only (default "any") it's help?

VValt wrote:You need to select portrait in the build settings of XDK.

I tried both these and added the screen orientation plugin, but it still twists the screen so there's black bars either side (I'm mentioning this so you know it's not turning my game widescreen, it's just not locking the orientation).

If you built it for Crosswalk, did you make sure you changed the tab of build settings to 'Android (crosswalk)' and didn't accidentally set things up for normal Android build? That tab is open by default and I sometimes accidentally set things up there.

If you still can't get it to work, you should probably ask about it at the XDK forums as well:
https://software.intel.com/en-us/forums/intel-xdk

Yeah, performance is a lot better disabling standard Android and just using Crosswalk, but no luck fixing it to portrait even when the phone is on it's side. The emulator also doesn't lock the orientation :/
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248

Post » Tue Jan 19, 2016 10:27 pm

Any step-by-step instructions to ensure the screen stays portrait at all times?
B
41
S
12
G
14
Posts: 1,117
Reputation: 11,248


Return to Beginner's Questions

Who is online

Users browsing this forum: skrotar and 2 guests