- Home /
item returning to it's default position
i am making a 2d drag and drop game and i want my item to return to it's default position when i don't drag it in a slot
Answer by Captain_Pineapple · Jan 31 at 02:43 PM
save the transform.position
of the object when you start dragging it.
set transform.position
to the saved value when the object is released and not in a slot.
i want all items t o return to their original position and i want my code to be in few lines
okay. What have you tried? what does not work? This is a help forum, not a code generator. You posted a generalized question of what you want to do, i described the solution.
If you need specific help with something then be specific in your question and at least put in some effort to describe what you are currently doing and why your current approach is not working.
ok understandable i'll try to work on it myself
Your answer
