x


iPhone Multitouch Problem

Hello,

I'm having a problem with multitouch. I have a slider on the left and right of the iphone screen in landscape. Using touch I've got both sliding up and down via touch and both respond at the speed I require when moved on their own. The problem starts when I try and move both and the same time. I have disabled one of the handles to test just the other on its own. Moving it with one finger is perfect but as soon as i touch anywhere on screen with a second finger the movement stops working. I wondered if the solution could be found using fingerIds but I'm having trouble understanding them. Any help would be appreciated.

Thanks

more ▼

asked May 23 '10 at 09:46 PM

DanMarionette gravatar image

DanMarionette
177 11 12 21

You can pull the code from the example set up with the 2 screen joysticks that's included when you import the iphone standard package

May 23 '10 at 10:13 PM spinaljack

Could you perhaps post your code? I've done a few touch-interfaces using Unity with gestures that I could help debug this for you.

May 23 '10 at 10:39 PM equalsequals
(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

What my team and I did when developing a control interface for one of our iPhone games was divide the screen into different regions using Rect.

In our Update loop where we did all of our touch tracking we began with checking if the touch object in question was contained within the Rect and if so handle it appropriately.

We found that this method allowed us to have multiple gestures going on simultaneously with a minimal amount of extra conditional statements everywhere to sort things out.

Hope that helps.

==

more ▼

answered May 23 '10 at 10:47 PM

equalsequals gravatar image

equalsequals
4.5k 16 28 64

Thanks for your input guys. Equalsequals, that worked perfectly. Simply wrapped my existing code with an if statement checked if the touch occurred in a particular region and all is working great now. If you'd like to see the code still then let me know. Thanks

May 24 '10 at 06:33 PM DanMarionette

Glad I could help out! Posting code could help others who are having similar problems, just make sure that you mark your question as "[Solved]" when you do. Cheers! ==

May 24 '10 at 06:44 PM equalsequals
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x2014
x606
x66
x5

asked: May 23 '10 at 09:46 PM

Seen: 3108 times

Last Updated: May 23 '10 at 09:46 PM