Author Topic: Raycasting multiple items  (Read 1192 times)


  • Guest
Raycasting multiple items
« on: September 24, 2013, 04:05:55 PM »
Hi everyone, I have quite a simple problem that I am sure has been solved before.

I have certain GUI elements which overlap (by design) and I would like a list containing references to them all when I click/release a mouse button.

Similar behaviour to RaycastAll.



  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Raycasting multiple items
« Reply #1 on: September 24, 2013, 06:51:24 PM »
You will have to code your own logic for hit detection as NGUI doesn't do that for you. You can calculate the dimensions of each widget by retrieving their UIWidget.worldCorners (or UIWidget.localCorners if you prefer).