Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: Jeffom on April 05, 2013, 05:34:31 PM
-
Hello i'm having an issue with a Drag'nDrop script (the one from the example) inside a scroll view
I have a script that works well in the editor but when i test it on a device (android 800x480 res), it gets buggy.
During the drag i'm reparenting the object so it won't be clippeid when i drag the object outside the scroll view, but when i try to return the object to its original position
the local position coordinates seems to get messed up, i'm keeping the initial vector3 position in the Start function and then i set it again in the drop function to make it go back into it's original position inside the scroll view. But when i set the localposition it's always off.
Can anyone help me on this?
-
You need to save and restore the transform.position, not localposition.
-
I've tried that already but it's still off
-
Finally figured it out, it was something dumb
i was saving the position at the start function but when i moved the scroll list the original position would change,
So i started saving the position on the OnPress function