Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: TommyT31 on September 21, 2013, 08:34:18 AM

Title: Help with Colliders
Post by: TommyT31 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!
Title: Re: Help with Colliders
Post by: OnlineCop 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.
Title: Re: Help with Colliders
Post by: ArenMook 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.