Welcome,
Guest
. Please
login
or
register
.
June 13, 2026, 04:56:53 PM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Dragging is too fast
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dragging is too fast (Read 3833 times)
ergoproxy
Guest
Dragging is too fast
«
on:
September 09, 2013, 02:45:27 PM »
Hi Guys.
Great tool you have there. Worth every cent. I am creating a game which needs an diablo style inventory.
For every Inventory-Item-slot I set up a DragDropContainer in which I put the Item which is a UIImageButton + DragDropItem. When I start the scene and start dragging then the IconSprite is way too fast. It won't stay on the cursor but shoots off 50px on the screen every 1px I move the mouse. How can that be? I don't use a UITable or anything else.
What am I missing? Why is the delta from OnDrag() so fast?
Thanks for NGUI and your help
-ErgoProxy
Logged
ergoproxy
Guest
Re: Dragging is too fast
«
Reply #1 on:
September 09, 2013, 02:47:55 PM »
http://www.tasharen.com/forum/index.php?topic=5737.msg27181#msg27181
I was not sure if this is the same problem so I created a new Thread.
To be clear: The Sprites gets dragged in the right directions, but too far.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Dragging is too fast
«
Reply #2 on:
September 10, 2013, 07:14:11 AM »
Something like this is generally caused by you messing up the scales. Everything leading up to your dragged object must keep the scale of (1, 1, 1), except the UIRoot. If it doesn't, you will see weird results.
Logged
ergoproxy
Guest
Re: Dragging is too fast
«
Reply #3 on:
September 10, 2013, 12:51:57 PM »
Thanks for the quick response, ArenMook.
The scales were all set up correctly (1,1,1);
I studied your example #11 a little bit more today. It seems I missed the DragAndDropRoot *duh*. Deleting this script causes the dragging to go nasa space rocket.
Cheers from germany.
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Dragging is too fast