Author Topic: Button OnClick working with Mouse but not TouchScreen  (Read 4103 times)

Voodooshuffle

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 8
    • View Profile
Button OnClick working with Mouse but not TouchScreen
« on: September 23, 2014, 02:15:29 AM »
I can't figure out for the life of me what is going on after all the tutorials. I have a button that works perfectly with mouse clicking. But it works very rarely with tap on my iphone. I've tried using 3d colliders and removing EasyTouch, none of it seems to work. It seems like if I touch the very most right side of the button it works more, but I could be imagining it. The button does work when I touch it after about 20 or so tries. Can anyone help me figure out what's going on? I'm using the button onclick event to pause the game --works perfect with mouse click.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Button OnClick working with Mouse but not TouchScreen
« Reply #1 on: September 23, 2014, 12:12:06 PM »
Every time I've heard of this it was caused by the touch screen itself. Try moving the button to another part of the screen.

P.S. I am assuming your UICamera is correctly set to "UI" type (3D UI).

Voodooshuffle

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Button OnClick working with Mouse but not TouchScreen
« Reply #2 on: September 23, 2014, 03:04:28 PM »
Almost positive it is but I will double check after work. I tried moving the button from bottom left to upper right yesterday. Same problem. Could you tell me what your setting is for pixel on uicamera under the touch and swipe options? Maybe this could be causing the problem.

Voodooshuffle

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Button OnClick working with Mouse but not TouchScreen
« Reply #3 on: September 23, 2014, 08:20:17 PM »
Fixed, had to shift UIRoot into perspective, move the button, and make it larger. Combination of steps so far have it working.