Author Topic: QueryTriggerInteraction.Collide on UICamera.cs  (Read 2471 times)

daku

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
QueryTriggerInteraction.Collide on UICamera.cs
« 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?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: QueryTriggerInteraction.Collide on UICamera.cs
« Reply #1 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.