Author Topic: ios multi touch issue - button staying pressed  (Read 5030 times)

smoothnshiny

  • Guest
ios multi touch issue - button staying pressed
« on: April 20, 2012, 05:59:08 AM »
Hi everyone, I'm new here and this is my first post :)

I'm currently making an ios game with simple left, right and fire controls at the bottom of a portrait (locked) game. I'm going through it replacing the existing UI with NGUI.

The problem I have is that when testing on Unity Remote or when I actually build to the device the UI seems to get confused with the button states. When I press the left button and hold it, then tap and hold the right button until it shows it's pressed state, at this point I am touching both buttons and both are in pressed state. Then if I let go of the buttons one by one, one of the buttons stays pressed. By 'staying pressed' I mean that it's in it's pressed state sprite-wise and the OnPress() function is still coming up as true, even though no fingers are touching the screem. The button only returns to it's normal state if you press and release it again.

I'm using the free version of NGUI at the moment.

I've tried all sorts but even when the UI is totally stripped back, ie no scripts or message calls... just the UI, I still have the same issue.

Any help on this would be much appreciated as I've spent ages on this to no avail.

smoothnshiny

  • Guest
Re: ios multi touch issue - button staying pressed
« Reply #1 on: April 20, 2012, 06:44:50 AM »
After some more messing around I think the issue is just on Unity Remote. When I build to the device the buttons don't stay locked on pressed.

Does anyone know if Unity Remote struggles with multi touch?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ios multi touch issue - button staying pressed
« Reply #2 on: April 20, 2012, 07:29:39 AM »
NGUI free comes as-is and isn't supported right now due to the large amount of changes that have happened since it was released 2 months ago. This was one of those issues that was already fixed in the full version of NGUI.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ios multi touch issue - button staying pressed
« Reply #3 on: April 20, 2012, 07:31:03 AM »
Btw the issue is because Unity remote sends both mouse and touch events at the same time, which is what's causing NGUI to get confused. Turn off mouse events on the UICamera.

smoothnshiny

  • Guest
Re: ios multi touch issue - button staying pressed
« Reply #4 on: April 20, 2012, 10:25:56 AM »
Thanks for the reply :)

Assuming I can get our UI implemented with NGUI, I can't see any reason why not, we'll be upgrading to the full version before release. It's good to know the issues fixed.

I can't seem to see where to stop the camera receiving mouse events. It's not a problem as long as it works on the devices that's good enough for now.

Keep up the great work :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: ios multi touch issue - button staying pressed
« Reply #5 on: April 20, 2012, 10:31:14 AM »
Yeah it's one of the features in the standard version that have been implemented since the free version was released.