playMaker

Author Topic: How to FingerID two fingers when they simultaneousely touched the screen?  (Read 5947 times)

bigzer

  • Playmaker Newbie
  • *
  • Posts: 11
  • 1.3
Hi,

I'm having trouble with fingerID when I tap the screen with two fingers simultaneousely.
Basically I need to have the two fingers positions, in other words I need to tag each finger with an independent fingerID.

I first use a touch event that triggers transition to then listen for a second touch event.

Unfortunately with this method I end up having only one finger detected.
If I touch with the first finger and add the second one later it works fine.

Is there a solution for this problem? A special action perhaps?

Anyway I just bought Playmaker and I have to say that I'm having quite some fun with it :)
Good job playmaker makers ^^
Regards

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Hi,

 Multi touch is a difficult beast to tackle even with conventional script.

 You should try actually accessing the list of touch, and detect that two fingers are there or not, and take it from then. But I realize that some custom actions would be required for you to access the various touches on the list.

 Are you confortable with scripting?

 bye,

 Jean

 

bigzer

  • Playmaker Newbie
  • *
  • Posts: 11
  • 1.3
Thank you for your answer.

Unfortunately I can't script at all so I have to rely on actions ><.
Up to now I've been able to do quite some amasing stuff but I didn't found any working solution for this matter yet.

I made a camera controller, it pans the camera on X Y with one finger and at any time if you add a second finger it switches to zoom mode, if you release one finger nomater wich one it will go back to pan.

This works fine if you start with one finger and add a second one later (I just have to figure out how to calculate the finger distance delta to make the zoom work correctly though but that's another problem)

Now my problem is that if you start right away with two fingers it doesnt want to go to zoom mode, it goes to pan mode then I need to release one finger and touch back  with the second to get it's fingerID in order to let the script calculate finger distances.

So what I need is something to 'listen' when two fingers have been pressed simultaneousely and from there I will tag their IDs and calculate the distance delta.

I hope this explaination makes sense to you.
Bye





Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Try using the Get Touch Count action to filter the gesture... (if touch count = 2 transition to Zoom Mode).

bigzer

  • Playmaker Newbie
  • *
  • Posts: 11
  • 1.3
Hi,

Thanks for your suggestion. I thought about it but I wanted to calculate the zoom based on the initial fingers position and their distance difference during move. To calculate this I need the 2 finger positions.

If I do it the 2 finger count way I will still only have 1 fingerID.

It whould be really helpfull if there was an action that could 'listen for 2 touch' and if 2 touch detected store 2 fingerIDs.

Im not sure how Playmaker works under the hood but when I guitext the touchcount and tap with 2fingers I instantly see it going from 0 to 2 so It should be possible no?

Regards

bigzer

  • Playmaker Newbie
  • *
  • Posts: 11
  • 1.3
Following up,

Using the 'touch count' system to detect 2 fingers also brings another problem; The delta and the position from the recorded fingerID is not precise. They are I beleve the average of both finger position.
The finger ID get's it's precission back if you release one finger obviousely.

In other words this workarround method is not usable

Sad panda :(

How about an action that 'scans' the finger ID and determines if its made out of 2 fingers and if it's the case separate them, save the additional fingerID, and launch an event?
This way it's a granular approach usable by everyone for everything :D

Regards
« Last Edit: March 21, 2012, 04:27:13 AM by bigzer »