playMaker

Author Topic: Only allow one finger?  (Read 3571 times)

Slater

  • Full Member
  • ***
  • Posts: 123
Only allow one finger?
« on: October 01, 2012, 07:05:05 PM »
In my FSMs that handles the option to drag and drop clothes onto a character, I have a problem that if another finger touches the screen, the piece of clothing teleports to 0,0,0 and I have no idea why. I thought that a good thing to do might be to limit to only notice one finger, the finger that is in action at the moment.

So at the point in where my FSM looks for "Touch Object Event", can I maybe use "Get Touch Count" and then when I am dragging the item around have it locked to only 1 finger so that nothing odd happens if another finger touches the screen during the dragging?

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Only allow one finger?
« Reply #1 on: October 02, 2012, 06:29:32 AM »
Hi,

 you have to store the finger ID and then only check touch events for that finger Id. that's how you prevent multi mess :)

bye,

 Jean

Slater

  • Full Member
  • ***
  • Posts: 123
Re: Only allow one finger?
« Reply #2 on: October 02, 2012, 10:48:23 AM »
Hey! Thanks. Its working now. I tried fiddling around with it before but I think I stored it in the wrong state. Now when I store the finger id in the get touch info (that does it every frame) it works.

Cheers Jean!