Simplest way to drag and object around in 2D space.

Hi,

What’s the simplest way to drag an object around with tap and drag? Objects will move only in X/Y plane.

Thanks.

You could do a raytrace from the camera to get and “Grab” your object.

Then, make the object follow the mouse cursor. (with OnMouseDrag, or with raycasting from camera, or by converting yourself the cursor position to your ingame position ?)

until you release the button to “drop” the object