Author Topic: Using FingerGestures with NGUI - Screen to pixel from/to coordinates conversion  (Read 1703 times)

NeatWolf

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 0
  • Posts: 8
    • View Profile
Hi,
I was trying to interface FingerGestures with NGUI.

Fingergestures (that I need to catch swipes and drags) works with Screen coordinates while NGUI (scaling Style constrained) seems to work another way. Are there any utility functions that allows me to go from screen to local/global NGUI units and vice versa?

Thanks for your time.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Just convert from one to the other. UIRoot has a pixelSizeAdjustment value you can multiply (or divide) by, depending on which way you're going.