Author Topic: NGUI Touch and Game Camera touch input  (Read 4083 times)

neken

  • Guest
NGUI Touch and Game Camera touch input
« on: November 18, 2012, 07:53:13 AM »
Hi,

In my game i have separate camera for GUI (GUI Layer) and another game camera for all other layers. My game based on screen input on the all screen but when i click on my GUI button the Game Camera receiver
Quote
that input too - it's any good  solution to block game camera input when first object what i touch is GUI element ?

I know how to do that in one camera i can check the reycast layer but i have problem to do that with secound camera in the game.

Thank you.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: NGUI Touch and Game Camera touch input
« Reply #1 on: November 18, 2012, 03:48:24 PM »
If you're using NGUI properly for your events, this is done for you already and you don't have to do anything. The first camera to see something (GUI, if its depth is higher) will intercept the event.

If you have your own Input-reading implementation on the game camera, then it's more difficult as you need to do your own checks. On the PC its simple enough -- UICamera.hoveredObject, but on a touch based device there can be a few touches, and it becomes more complicated.