For more detail this asset from the Unity Asset Store: Click Here
This is a paid asset, but now you can download DragRigidBody2D for FREE, Please keep in mind this package is provided only for learning purposes or to be able to test before buying the product, NOT FOR COMMERCIAL PURPOSES.
DragRigidBody2D
This package will get you up and dragging RigidBody2D game objects around in under 5 minutes. It is as simple as attaching a script to your camera, tweaking a few values, and deciding which layers should be draggable. It’s that easy! Works on Standalone (PC, Mac, Linux), webplayer (WebGL), and mobile platforms.
Check out a video of it in action!
Multi-touch is also supported on mobile!
Options include:
– Multiple drag layers
– Drag hook events such as OnStartDrag and OnStopDrag
– Drag damping
– Rotation freezing
– Snapping to center
– Drag relative to another rigid body
Examples are included with the package to get you started.
Recently updated for Unity 2019