Author Topic: drag and drop precision [SOLVED]  (Read 1500 times)

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
drag and drop precision [SOLVED]
« on: February 15, 2014, 11:06:53 AM »
Hello,

i'm working on a very simple thing that allow user to drag a card and drop it on a panel

my problems (2 major) are that:
- when i drag the sprite out of the scrollview, it doesn't stay fixed to the mouse position.
- When i drop it, it stay positioned where it was, not at the mouse position, and plus, i would like it to be centered to the sprite wich i attach it.

see the short video

http://www.youtube.com/watch?v=0RH6DFz8WIs

i watched exemple, and can't see any difference between my sprite and the one from the exemple scene


« Last Edit: February 24, 2014, 08:46:06 AM by blackant »

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: drag and drop precision
« Reply #1 on: February 16, 2014, 02:09:58 AM »
I'd be curious to know how you got to that. Try as I may, I was not able to break the drag & drop example in the same fashion. I even changed the scales of everything, but it always works as expected. You are using the drag & drop example from the latest version of NGUI, are you not? Because if you're using the character inventory example instead, then you shouldn't be.

blackant

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 22
    • View Profile
    • blackant master
Re: drag and drop precision
« Reply #2 on: February 24, 2014, 08:45:47 AM »
i finally fund, i didn't put a panel with drag and drop root, since i did it it works perfectly