Question by
jellykebab · Jun 05, 2020 at 08:38 PM ·
uidrag-and-dropsnapping
Snap objects back to their original place
im trying to build a small game where the user has to use their mouse to drag and drop items to a certain box. im currently working on making it so if the user doesnt drop the item into its correct place, it snaps the item back to its original place. however when i try to get the x and y values of the game object it gives me completely different numbers and places the item in a completely different place. im pretty sure it has something to due with the fact that im using UI elements to build this (i followed a guide since this is my first time trying unity) but im not sure what i have to fix to get the proper position values :(
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613000209im_/https://answers.unity.com/themes/thub/images/avi.jpg)