unity magnetize a 3d object to cursor
mousePosition = Input.mousePosition;
mousePosition.z = Mathf.Abs(cam.position.z - ball.position.z);
mousePosition = Camera.main.ScreenToWorldPoint(mousePosition);
dir = mousePosition - object.position;
ball.AddForce ((dir).normalized * force);