how to make objects follow the camera/window

Get help using Construct 2

Post » Fri Oct 05, 2012 5:49 pm

I need to make arrows/buttons to follow the camera for an android game but I have not used construct 2 for a year so i need to know how:/
B
14
S
4
G
2
Posts: 42
Reputation: 2,046

Post » Fri Oct 05, 2012 6:10 pm

I'm guessing you're talking about interface elements that move with the screen? To do that, create a layer above all of your other layers and set the parallax values to 0. This will keep the layer in place while scrolling and you can put your interface elements on it.

Alternatively - and this is probably the best method if you're targeting multiple resolutions - you can add the anchor behavior to your interface objects. This will position them relative to the canvas based on where they were originally placed in the layout. This works better than the layer method because if you change the canvas size in game, all interface objects will adjust accordingly based on the edges of the screen they're bound to.linkman20042012-10-05 18:11:35
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Thu Oct 18, 2012 1:23 pm

Yea thx remember now:D
B
14
S
4
G
2
Posts: 42
Reputation: 2,046


Return to How do I....?

Who is online

Users browsing this forum: Draconinho, LeFuji, totoe and 12 guests