Author Topic: Problem with UIDragObject  (Read 2310 times)

grozzy39

  • Guest
Problem with UIDragObject
« on: October 01, 2012, 10:21:05 AM »
Hi

In our game we have implemented an orbit camera using the usual Update events etc. The problem then: when we are dragging widgets around this is obviously still orbiting the camera, something we don't want.

Question is what is the best approach to take to tackle this? We need some way to inform the orbit camera code that something is being dragged around.

TIA.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Problem with UIDragObject
« Reply #1 on: October 01, 2012, 05:02:29 PM »
The problem is in how you implemented your orbit camera. I'm guessing you are reading Input events directly instead of relying on NGUI's OnDrag event. If accessing Input directly, add a check for UICamera.hoveredObject != null.

grozzy39

  • Guest
Re: Problem with UIDragObject
« Reply #2 on: October 02, 2012, 03:57:20 AM »
Brilliant! Thanks.