Author Topic: DragDropItem delta mistake, mouse position mismatch with object position ondrag  (Read 2464 times)

MelihToksari

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Hi everyone,

I'm using NGUI v.2.7
First, i look this post (http://www.tasharen.com/forum/index.php?topic=1428.0) and i am using pixelperfect in UIRoot.
But I cannot handle with delta attribute in method OnDrag(Vector2 delta). My gameObjet position is different from the mouse position. In play mode, gameObject position is considered as mouse position. Collisions are activated through mouse position not for gameobject position.

I try to change delta with these;
    mTrans.localPosition += (Vector3)delta * Screen.height / rootRootScript.manualHeight;
    mTrans.localPosition += (Vector3)delta * Camera.mainCamera.aspect * Screen.height / rootRootScript.manualHeight;
but the result is same unfortunately.
Can anyone help me on this issue?
Thank you.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Sorry, but NGUI 2 is free, and doesn't come with support.