Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: daku on October 07, 2016, 10:33:52 AM

Title: QueryTriggerInteraction.Collide on UICamera.cs
Post by: daku on October 07, 2016, 10:33:52 AM
Hey, when you uncheck "Queries Hit Triggers" in Unity's PhysicsManager, some functionalities of NGUI no longer work, notably the ScrollAreas.

It's easily fixed by changing l. 592 of UICamera.cs from this:

  1. if (Physics.Raycast(ray, out hit, dist, mask))

to this

  1. if (Physics.Raycast(ray, out hit, dist, mask, QueryTriggerInteraction.Collide))

without damaging the framework (triggers will still get hit).

Can this fix be included in the next update?
Title: Re: QueryTriggerInteraction.Collide on UICamera.cs
Post by: ArenMook on October 11, 2016, 09:35:47 AM
I can certainly add that, but keep in mind that you will probably only want this functionality for UI interaction, not world -- so this would go under the
  1. else if (cam.eventType == EventType.UI_3D)
...section instead. World interaction going to triggers doesn't seem right to me.