How do I centre the game window on the screen?

Get help using Construct 2

Post » Thu Apr 10, 2014 5:14 pm

Hey, so right now I'm running my game in portrait mode on mobile, and to compensate for different aspect ratios, I'm using "scale outer", and leaving a bit of overhang with my background on either side of the layout. My layout is 720x1280, and the window size is the same. The scaling works great, but I've found that the game window is aligned to the left side of the screen, when ideally it should be centered. Is there any way to change this?
B
4
S
1
G
3
Posts: 31
Reputation: 1,114

Post » Fri Apr 11, 2014 10:43 pm

I'm curious as well
B
90
S
44
G
17
Posts: 1,012
Reputation: 18,537

Post » Fri Apr 11, 2014 11:56 pm

Change your setting of "unbounded scrolling".
B
80
S
29
G
32
Posts: 483
Reputation: 19,942

Post » Sat Apr 12, 2014 12:47 am

Try this maybe help :

set Position (ViewportLeft("Layer") + ViewportRight("Layer")) / 2

See ya
B
28
S
2
G
3
Posts: 20
Reputation: 3,535

Post » Sat Apr 12, 2014 1:46 am

jastrazz wrote:Try this maybe help :

set Position (ViewportLeft("Layer") + ViewportRight("Layer")) / 2

See ya

Thats the way I do it. :-)
Please Support Ocean Explorer.
http://igg.me/p/735007/x/6915815
B
14
S
4
G
3
Posts: 125
Reputation: 2,645


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 32 guests