Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: laurentl on April 02, 2013, 03:57:03 AM

Title: Raycast Hit Triggers ?
Post by: laurentl on April 02, 2013, 03:57:03 AM
In McDROID Raycast hit trigger would be bad, how do we change NGUI so it doesn't require that ?
Title: Re: Raycast Hit Triggers ?
Post by: Nicki on April 02, 2013, 04:31:10 AM
You turn of Raycast Hit Triggers in physics settings and mark all your colliders as not triggers.

You can make a editorscript that runs through your colliders and disables the trigger flag. You may want to modify the standard widgets as well in UICreateWidgetWizard.cs
Title: Re: Raycast Hit Triggers ?
Post by: laurentl on April 02, 2013, 05:01:35 AM
This works well. I am sure the impact on physics is minimal (physics needs rigidbody when changing colliders or there is a big hit)
Title: Re: Raycast Hit Triggers ?
Post by: Nicki on April 02, 2013, 05:27:46 AM
Just make sure that stuff in your GUI layer can't collide with the other layers, so you don't have some of the bugs I had where my character stumbled on the buttons. :D
Title: Re: Raycast Hit Triggers ?
Post by: laurentl on April 02, 2013, 05:35:54 AM
Hehe I think I freed one layer for GUI ... all the others are taken.