Drag Rigid Body No Distance Limit and how to add Mouselock to a scrip

Hey guys,
I the Unity3D script DragRigidBody there is a limitless distance as in I can move an object with the script from the other side of the map. Is there a way to limit the distance the distance than I can pick up an object. Also I have heard about a MouseLock for script that keeps your mouse in the centre of the screen for a game how would I add that to a First Person Character Controller

For the first one (And I have never touched Unity before yesterday) I would suggest you define a variable for your distance limit, then at the appropriate place in your code, add a condition that compares the magnitude between the main camera’s transform and the transform of either the object or the mouse hit location. Not sure how to do those specifically since I’m new.

2nd thing - We’ll need someone to supply us info for the mouselock thing cause I don’t know.