Author Topic: Help with Colliders  (Read 1918 times)

TommyT31

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 21
    • View Profile
Help with Colliders
« on: September 21, 2013, 08:34:18 AM »
Hi,

I have a panel on my screen that gets covered up by another panel with a dimmer sprite I use thats is stretched to take up the whole screen. The dimmer is behind the current panel. I was hoping to be able to attach a collider to the dimmer and make it so the colliders underneath it on the panel below the popup wouldn't fire. Sort of making a modal type panel. I'm not sure how to do this as the widgets under the dimmer still respond to hovers and click events. Is there a component im missing attaching here? Or is there plans to do a Modal Type panel for NGUI? If not can we add that to a future feature request??  :)

Im sure im not the only one trying to use modal panels..

Thanks in advance all!

OnlineCop

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 51
    • View Profile
Re: Help with Colliders
« Reply #1 on: September 21, 2013, 02:59:56 PM »
How far forward is the entire popup? Try setting the entire popup tree, including the background dimmer with its collider, closer to the camera than anything else. The negative z depth should correctly block all click/hover events behind it.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Help with Colliders
« Reply #2 on: September 21, 2013, 09:23:09 PM »
Version of NGUI matters here. Prior to 2.7.0 -- yes adjust Z. 2.7.0+ -- set panels to depth sort, and adjust depth.