DNESS / cocos2d-iphone

Automatically exported from code.google.com/p/cocos2d-iphone
1 stars 0 forks source link

Multitouch detection error #1116

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have a EAGLView;
2. I'm enabeling multitiuch on it;
3. I'm using ccTouchesBegan, etc.. (Touches delegate methods);
4. The number of touches are not corectly detected.

What is the expected output? What do you see instead?

I press the view. I get a touches began with one touch. I press the view again 
with another finger and i get touchesEnded with one touch. 

It is needed to detect two touches in touchesbegan method.

What cocos2d version / SVN revision are you using ?

0.99.5

What iPhoneSDK are you using ?

4.2

Debug or Release ?

Release and Debug.

Does this happens on device ? or on the simulator ? or on both ?

Only on device. This is because on device to touch with two finger at the same 
time is very hard. On the other hand, on emulator work well because the fingers 
are simulated with alt key, and they touch the screen at the same time.

Please provide any additional information below.

A solution is to replace in the touches delegate method the set of touches with 
the one provided by the event:

touches = [event allTouches];

This detecs correctly the number of touches. It can be also updated on the 
EAGLView on UIView delegate methods, where are inwoked the cocos touch methods. 

Original issue reported on code.google.com by conradci...@gmail.com on 21 Feb 2011 at 11:51

GoogleCodeExporter commented 9 years ago

Original comment by ricardoq...@gmail.com on 24 Feb 2011 at 1:37