Placing an object in a dressup game

I know the code to drag objects around in a dressup game,
my question is, how can I make an object align to the body automatically if it is placed somewhere near the body? (creating some sort of a “magnet” effect)

thanks.:hugegrin: