Control pad that follows camera

Discussion and feedback on Construct 2

Post » Wed Oct 10, 2012 10:57 pm

Im making a game for android and ios and i was wondering is there a way to build a control pad for the user to touch and follows the screen as the character is moving?


Is there any behaviors, plugins, or examples that someone can show me?

B
3
Posts: 6
Reputation: 312

Post » Wed Oct 10, 2012 11:48 pm

To make your gui "follow" the screen, place your control pad sprites on a separate layer and set the layers parallax to 0,0.
B
73
S
20
G
10
Posts: 524
Reputation: 9,896

Post » Thu Oct 11, 2012 1:16 am

another way is to position the controls on the screen and give them the ANCHOR behaviour.
B
19
S
5
G
4
Posts: 208
Reputation: 3,960

Post » Thu Oct 11, 2012 4:01 am

You still need to place it in a separate layer with 0,0 parallax

Manual Excerpt:
"Objects using the Anchor behavior should also be played on a layer with its parallax set to 0, 0. Otherwise as the game scrolls the objects may "lag" behind the screen."
https://www.scirra.com/manual/88/anchor
B
73
S
20
G
10
Posts: 524
Reputation: 9,896


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 9 guests