how to apply gravity +other physics etc if mouse is player?

I have a script that moves player with mouse ,
what I need is to apply gravity and other drag etc physics motions to it,

when this script is attached to gameobject gravity doesn’t work/apply since mouse take control over the rest I guess when I place the rigidbody 2d gravity nothing happens

so how do I apply gravity and or drag and other similar related physics?

this is 2d and javascript

var myCamera : Camera;

function Start () {

}

function Update () {

var vec : Vector3 = myCamera.ScreenToWorldPoint(Input.mousePosition);
var side : float = 8.0;
var top : float = 9.0;
vec.x = Mathf.Clamp(vec.x, -side, side);
vec.y = Mathf.Clamp(vec.y, -top, top);
vec.z = 0.0;
transform.position = vec;

}

if no cursor is visible, you could use addforce to your player’s rigidbody, based on the mouse’s DELTA. Let the game engine handle gravity on the rigid body. No need to compute world coordinates for your mouse. something like this: (uncompiled/untested, but you should get the idea)

//inside your player class
FixedUpdate()
{
   rigidbody.AddForce(Vector3(InputChangeX*force_factor,InputChangeY*force_factor,0));
}

Try making a empty gameobject and center it in on what your moving and add the thing your moving to the empty game object and take the script off, then add a rig body to the thing your moving.