Author Topic: Raycast go through NGUI buttons  (Read 2231 times)

wijesijp

  • Guest
Raycast go through NGUI buttons
« on: September 12, 2013, 03:32:01 AM »
I am building a Unity game for mobile. I have implemented touch tracking system for it to move game object around.
  1. foreach (Touch touch in Input.touches)
  2.                 { ...}

When the user finishes moving I do a raycast and find out the object it hit.

When I add NGUI interface to the game the raycast is going through the NGUI buttons. 

Is there a NGUI touch system that I can use to manage game objects?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Raycast go through NGUI buttons
« Reply #1 on: September 12, 2013, 08:12:07 AM »
You're the one doing a raycast. Specify a mask that doesn't involve the GUI and it won't hit it.