Single Touch multiple input

Get help using Construct 2

Post » Mon Apr 15, 2013 8:40 am

Is it possible for a single touch that overlaps two on-screen objects to issue two different commands?

In other words, I want my ship to be able to move forward and turn at the same time. Currently this isn't possible, unless the user presses both buttons with different fingers.

Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Mon Apr 15, 2013 8:55 am

I just did a test and figured out how to do this.

Nevermind this thread - just make sure collision boxes for your buttons are colliding and it's totally possible!
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194

Post » Mon Apr 15, 2013 9:18 am

Hey @Excal
Would you post a .capx to show us ?
Thanks !
B
20
S
9
G
4
Posts: 197
Reputation: 4,080

Post » Mon Apr 15, 2013 9:30 am

I won't share my .capx since it contains copyrighted art assets.

Basically just make sure the collision polygons cover your objects entirely (the defaults are often fine for this), and then overlap your objects like so.



Notice the right button and the go button overlap? This means if a touch input is hitting both of them, the player will move forward and turn right at the same time. It's kind of a tricky movement, since it's not as easy as using arrow keys on the keyboard, but it works.

I personally had to reduce the turning speed on touch compared to the keyboard to make it more responsive.Excal2013-04-15 09:30:44
Project Lead of Zems Online Card Game

Producer at Impulse Limited
B
18
S
6
G
3
Posts: 677
Reputation: 5,194


Return to How do I....?

Who is online

Users browsing this forum: Baidu [Spider], mercuryus, mystazsea and 18 guests