Author Topic: UICamera.lastHit.point always 0,0,0 in OnDrag event  (Read 2530 times)

PMcG

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
UICamera.lastHit.point always 0,0,0 in OnDrag event
« on: September 20, 2013, 05:41:38 AM »
Since upgrading to v2.7.0 my drag and drop code no longer works because lastHit.point is always 0,0,0 (and the collider/transform is null) when accessed in the OnDrag event.
I was using this point to position a UI element at the position of the cursor but now it's always in the centre because of the zero position.
I have no idea why this has changed and I don't want to alter any NGUI code because of future updates etc.

If you check Debug on the camera and then do a drag on an item you will see it disappears from the debug display because the raycast hit is now invalid.
This wasn't the case in the previous version.

Anyone know why this is happening?
Thanks.

PMcG

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: UICamera.lastHit.point always 0,0,0 in OnDrag event
« Reply #1 on: September 20, 2013, 09:34:41 AM »
Never mind, I altered my code to do it another way.

Cheers.