In Cocos2D for iPhone, I want the latest touch event to interrupt another and ignore the last touch. Let me know if I need to elaborate more, but basically my game consists of a lot of finger dragging, and if the player ever switched fingers, there may be some overlap, and for the way things are setup, it may detect it as a new touch.
I think I have things almost on the right track, but my third touch does not work correctly. For instance:
- Touch A begins and held
- Touch B begins and held
- Touch A let go
- Touch A begins and held <-This should interrupt Touch B
In my delegate I put [glView setMultipleTouchEnabled:YES]; because I believe I need multiple touches enabled.
In my CCLayer class with my added map and sprite I am using targeted touch delegate (i.e. ccTouchBegan NOT ccTouchesBegan, etc)
I am accessing a touch object with touch = [[[event allTouches] allObjects] objectAtIndex:0];, however I don't have much understanding what index is considered the latest touch or even a process to always get the latest touch.