Author Topic: Double Uicamera\Double tap error  (Read 3141 times)

lemming

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Double Uicamera\Double tap error
« on: February 25, 2015, 10:03:45 AM »
Hi Guys\Aren!
 i have just a (quick?) question.. i have set up a multiple camera scene, an ortogonal one who render first,for ui, and a perspective one, for the game, everythings is fine, the ortogonal is being rendered first, BUT the touch event (tap in this case) on the perspective camera (with attached uicamera script) need two tap for some 3d button i put on, and by this i mean that i can tap everywhere on the screen  and only then i can tap the button and it works, like i need to get rid of the first input and then i'm free to get to the other uicamerascript attached to the perspective camera... this doesn't happen in editor mode with the mouse, just on device (android), the uibutton on the first camera (ortogonal) need just one tap..
I've already cleared the scene from every script that could possibly interfere, i don't know where to look at now... any help?
thanks!
Hope i've been clear :)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Double Uicamera\Double tap error
« Reply #1 on: February 27, 2015, 04:40:16 AM »
Perhaps your taps turn into drag events? I'm not sure what else this can be, but you can always just do a manual check yourself. In OnClick() record the press time. In the next OnClick() check this time against current, if it's within a specific threshold, treat it as a double-click.