Author Topic: Drag drop item lags touch even with pixelSizeAdjustment  (Read 2073 times)

soofaloofa

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 27
    • View Profile
Drag drop item lags touch even with pixelSizeAdjustment
« on: October 13, 2013, 02:53:26 PM »
Hi,

I've been debugging this for a while and haven't made any progress.

I have a scene where I want to drag/drop an item on iPhone. When dragging on the phone if I move quickly the object does not follow my exact finger position. Rather, once the dragging starts the object travels behind where my finger is resting instead of following it exactly. I've been updating my gameObject's localPosition using the following based on the UIDragDropItem example script

  1. mTrans.localPosition += (Vector3) delta * UIRoot.GetPixelSizeAdjustment(gameObject);

I have a UIRoot of FixedSize (960) and I've made sure that all of my objects are set to scale (1,1,1). Is there anything else I should be checking?

Thanks,

Kevin

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drag drop item lags touch even with pixelSizeAdjustment
« Reply #1 on: October 13, 2013, 09:23:27 PM »
Just to confirm -- the object lags behind, but it catches up if you pause, correct? This is normal. The UI gets redrawn a frame behind the events. All games work like that. The only way to avoid it is to use a hardware cursor rather than the UI to draw whatever you're dragging -- and that's outside the realm of NGUI.