Multitouch: Check X/Y for every touch

maprinz

  • Posts: 4
Hi folks,

I'm working on a Local Multiplayer Game for 2 Players: Each Player is moving an actor via Drag & Drop (similar to an air hockey game).

BUT that doesn't work, because I can't detect several X/Y coordinates with Multi-Touch in Stencyl. Both actors always stick to one of the touches, but do not move independently.

Any ideas how to solve that?

Thanks and bye,
- Matt

bonzero

  • Posts: 488
Hi

Look for user input on the events screen-->mobile advance-->Use the "for each started or dragged ..x of touch"

inside just put something like.. if (x of touch) is inside the button and (y of touch) inside the button...then...

That way even if something else touches the screen the button will still detect that there's somebody touching it, instead of just detecting the new coordinate of the new touch.

you have to use that under the "when updating" block

I think this is the most accurate way to make multitouch work, I'm not sure about the performance but i'm doing some tests for my game

petelachatte

  • Posts: 85
Hi

Look for user input on the events screen-->mobile advance-->Use the "for each started or dragged ..x of touch"

inside just put something like.. if (x of touch) is inside the button and (y of touch) inside the button...then...

That way even if something else touches the screen the button will still detect that there's somebody touching it, instead of just detecting the new coordinate of the new touch.

you have to use that under the "when updating" block

I think this is the most accurate way to make multitouch work, I'm not sure about the performance but i'm doing some tests for my game

How are you working on this ? Did you get a 'reliable' multitouch handling function ? I'm very interested.