How to make a gameobject follow the mouse when I click and drag on the object.

I’m trying to get it so when I click on my gameobject and move the mouse/touch (since this will be a game for android) then the gameobject should follow the mouse/swipe until the user lets go. Is their any simple way to do this? I have heard about using OnMouseDrag, but I can’t really figure it out.

So, convert your mouse screen position to world space, then move your object towards the location in world space?

What exactly is your problem?