GameObject drags with mouse?

I have been trying to write a javascript that will make a game object's position in the same position of the mouse without clicking to drag it.

Here is what I wrote:

`var theObject : Transform;
var positionOfMouse : Vector3;
function Update(){
    positionOfMouse = Input.mousePosition;
theObject.transform.position = lastMousePosition;

}

`

The problem is that the position of the mouse is shown by pixels and the object will move with what the positionOfMouse variable is. I cannot figure out a way for it to move exactly with the mouse. Could someone help me with making a script that will cause the object to be in the location of the mouse? Thanks.

http://answers.unity3d.com/questions/13145/13150#13150