How to snap fit a vector to a targeted location? Unity2d Dress Up game.

I am making a Dress Up game for kids, and I find it extremely bothering that I have to pick and drag dresses on characters and position as close as possible in Android (my fingers burn ).
I wish to implement a ‘drag’ and ‘snap in position’ method, although I have no clue how to begin that, as I can’t really create scripts, but can only read them.

Example- You will touch the dress you want to use, and will be able to drag it to the character, once the dress is near the character it will snap fit to its targeted position.

pls help

bump

Why do you need the ‘drag to’?
Why not just click on the dress and it appears in the spot you want it to.
If there is no reason to have the drag, just make it simple.

People would argue that dragging would be a chunk of the fun for kids.

So how I would do it is set up colliders in the areas you need clothes to be dragged to (head, chest etc). Then on the OnMouseUp (or whatever you’re using) I would setup a statement checking if it’s over a particular collider, if true-> snap to location, if not → snap back to the menu.

If you need more information, let me know.

EDIT: You’d also want to tween the object to the location for extra effect.

1 Like

thanks, that helps theoretically. Although I would need to code it, which I am afraid I am not able to do. I can read, edit fine, but making a code, I guess I’ll have to search for some related snap to collider example codes to make a script. Thanks for reply, sry I forgot to check the thread.