playMaker

Author Topic: Device multi touch not working  (Read 4486 times)

Keefus

  • Playmaker Newbie
  • *
  • Posts: 4
Device multi touch not working
« on: June 21, 2011, 06:55:57 AM »
Im having an issue in my pinball project, I have an 2 FSM's detecting a press on either side of the Device screen, works well enough until I hold down one side of the screen, now it wont recognise another touch until I release. Basically it wont recognise 2 touches at the same time, I have 2 finger ID's set up for left and right presses.

Any help would be much appreciated.

Alex Chouls

  • Administrator
  • Hero Member
  • *****
  • Posts: 4000
  • Official Playmaker Support
    • LinkedIn
Re: Device multi touch not working
« Reply #1 on: June 21, 2011, 09:37:15 AM »
What device are you running on?

Keefus

  • Playmaker Newbie
  • *
  • Posts: 4
Re: Device multi touch not working
« Reply #2 on: June 21, 2011, 09:39:27 AM »
hi, its a Samsung Galaxy S2

pixelrainbow

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Device multi touch not working
« Reply #3 on: November 06, 2013, 09:20:17 AM »
Strange, but I also have the same problem with my Samsung Galaxy S2. One gui texture is used to move the cam, a second one to zoom in and out by dragging it left and right.

If I zoom in then try to use the other gui texture to move, then zoom setting 'jumps back' to default 60 FOV value, until I release (do not tap any longer) the 'move' gui element.

Very frustrating, been fighting this for many hours now. I checked that I correlate the fingerIDs properly and have no idea right now what could be the problem. I'll try to create a test scene if run out of ideas how to fix this, but in any case, if someone knows the possible solution based on the description then it'd be great to hear it.

(Note: I could use input.touches probably, but PM's Touch GUI Event should also suffice and is easier to set up as well. So yes, my last resort could be Input.Touches but I'd be glad for the more convenient Touch GUI solution...)

pixelrainbow

  • Playmaker Newbie
  • *
  • Posts: 9
Re: Device multi touch not working
« Reply #4 on: November 06, 2013, 07:09:42 PM »
I have prepared a small test scene to showcase the problem. As aforementioned, I experience the problem on an Android device (Galaxy S2). I tried to re-create the FSM setup of my game as closely as possible.

Drag the red texture left and right to zoom in and out by changing the camera FOV. Then, while 'being zoomed in', keep tapping the unity watermark. It will rotate the object, which is the cam's parent, to a certain value (X=-15). The rotation is interrupted if your finger is up from the watermark.

If you use the two controls (i.e. the guiTextures) at the same time you can see the jumping effect I have mentioned. When the watermark is tapped and itween action is active, the FOV value seems to get corrupted.

Let me know if you have any ideas why this is and how to fix it.

[UPDATE]: I have decided to change my game interaction logic a bit to avoid this issue. In the end, I will end up supporting those devices as well, which do not support multiple touches.
« Last Edit: November 07, 2013, 12:51:25 PM by pixelrainbow »

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Device multi touch not working
« Reply #5 on: November 08, 2013, 01:56:14 AM »
Hi,

 Allow me few days to test this ok?

You can fill a bug report as well, it's easier to keep track ot as well.

bye,

 Jean

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Device multi touch not working
« Reply #6 on: November 14, 2013, 06:57:46 AM »
Hi,

 ok, it's not a bug, its simply that you do not keep track of the finger id.

when you watch for a "Touch GUI Event" for touch began ( no need to watch for moved and stationnary here), also store the finder ID, then on state 2, when you watch for a touch release ( tracking touch Ended and Touch Canceled, you got that right), you must pass the Finger ID you got from the touch began, and then you are sure that this is the same finger that you watch.

Does that make sense?

bye,

 Jean

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: Device multi touch not working
« Reply #7 on: December 26, 2013, 09:45:15 AM »
Just want to confirm, after storing and tracking the finger ID, it still has the jump effect, apparently when dragging the Cam FOV, and then touch the rotate GUI, it will reset the cam FOV...and I also have a problem like this, somehow the 2nd touch interrupt/resets the first touch....

I'm using Lenovo S920 as the testing device, and using Unity Remote....

jeanfabre

  • Administrator
  • Hero Member
  • *****
  • Posts: 15500
  • Official Playmaker Support
Re: Device multi touch not working
« Reply #8 on: December 27, 2013, 02:26:48 AM »
Hi,

 Unity Remote can be missing few touch events if you go fast, have you tested with a published version as well?

bye,

 Jean

cloud03

  • Full Member
  • ***
  • Posts: 249
  • Viva Playmaker!
    • Milkish Game Studios Blog
Re: Device multi touch not working
« Reply #9 on: December 27, 2013, 08:44:54 AM »
Just tested by publishing onto the device, and it still behaves the same....but not with the joystick bridge that jean made for playmaker, although that one does not use touch gui event at all, so my guess is on the touch gui event action that somehow cancel all other touch before...