Author Topic: UICamera.hoveredObject no longer returning hovered objects in 3D world space  (Read 8091 times)

Wumpee

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 0
  • Posts: 53
    • View Profile
Hey Arenmook,

With the latest version of NGUI (3.11.1), we've noticed that UICamera.hoveredObject is no longer being set for objects in our world. We have a UICamera object on the second (World) camera and it's set to Event Type '3D World'.

Has something changed in the latest version of NGUI that may have affected this?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
The only relevant change is that world events ignore trigger colliders now. Is that what you're expecting? Check line 1388 of UICamera.cs
  1. if (Physics.Raycast(ray, out lastHit, dist, mask, QueryTriggerInteraction.Ignore))
If you want events to go to triggers, change the camera's event type to UI_3D instead.