How do I create android joystick to move left right jump

Get help using Construct 2

Post » Mon Feb 09, 2015 11:16 am

Hello, does anyone already created a joystick for moving left right and jumping?
B
11
S
3
G
1
Posts: 411
Reputation: 1,766

Post » Mon Feb 09, 2015 11:49 am

One way would be by comparing touch x and y position.
When touch begins store touch x and y in variables. Then if touch x > stored x + desired distance that means player swiped his finger to the right by that distance.
Touch x < stored x - desired distance = right.
Touch y < stored y - desired distance = up.

Of course, that could mean player could swipe on whole screen for such effect, if you want him to swipe only on designated joystick object you should add event above "is touching object"
B
12
S
6
G
2
Posts: 99
Reputation: 1,727


Return to How do I....?

Who is online

Users browsing this forum: Phoenixbowman, Yahoo [Bot] and 7 guests