Hey Roaming Gamer,
Thanks for you prompt reply and I apologize for my delay. The effect I’m trying to achieve is having a one-finger touch automatically interact with characters in the foreground and a multi-finger touch automatically interact with the background (pinch and reverse pinch for scaling, rotating and moving the world).
In other words:
one touch —> character
multiple touches —> background and scaling
Currently, my app requires clicking on the “zoom” icon to enact the pinch-scaling and clicking on the “character” icon to interact with the characters. My play testers (and I) have found that clicking back and forth between character and zoom modes detracts from game play.
I was hoping there might be a native method for detecting multiple simultaneous touches. Your explanation of multi-touch being the independent tracking of multiple single touches exposes an errant assumption I made about the difference between single and multi-touch being different events. I see now that multi-touch isn’t an independent event but a collection of single-touches each tracked independently; “one handler per finger” as you said.
Here’s what I’m going to try:
Each time a touch event is registered I’m going to track it independently but keep a total count of simultaneous touches. If total count > 1, then I will pass each touch individually to the touch handler of my scaling module. If total count == 1, then that touch will interact with characters in the foreground (assuming the touch is on a character).
I think it will work! I’ll let you know how it goes, thanks again!
Jonathan