how can do click then move on a gameobject?

Hello everyone.

This is what i am trying to do :
click the gameobject, and after clicking, a directional arrow will appear (up, down, left, or right). The object has to be moved or dragged in that direction with the mouse.
eg. directional arrow is right. The player will click the gamebject and move the mouse in the direction (right). This will indicate a right swipe or drag. The gameobject will be moved along the X axis by +1, but if the swipe/ drag is in any other direction but right, the gameobject will not move.

Here is the code that I am trying:

var startpos : Vector3 = Vector3.zero;

function Update () {
if (Input.GetMouseButton(0) && !touched)
     {
       var hitm : RaycastHit2D = Physics2D.Raycast(Camera.main.ScreenToWorldPoint(Input.mousePosition), Vector2.zero);
       if (hitm.collider != null && hitm.collider.gameObject == circle)
       {
         var mouseDelta : Vector3 = Input.mousePosition - startpos;
		if(mouseDelta.x < -0.5){
		movedir = left;
         }
         if(mouseDelta.x > 0.5){ 
movedir = right;
         }
if(mouseDelta.y > 0.5){
movedir = up;
         }
if(mouseDelta.y < -0.5){
movedir = down;
         }
startpos = Input.mousePosition;
      }
   }
}

This isn’t giving the desired result. The gameobject is being moved with the transform script :

if ( movedir == down){
transform.position = Vector3.MoveTowards(transform.position,Vector3(transform.position.x,
transform.position.y-1, transform.position.z ), 2* Time.deltaTime);

}
else if ( movedir == up){
transform.position = Vector3.MoveTowards(transform.position,Vector3(transform.position.x,
transform.position.y+1, transform.position.z ), 2* Time.deltaTime);

}
else if ( movedir == left){
transform.position = Vector3.MoveTowards(transform.position,Vector3(transform.position.x-1,
transform.position.y, transform.position.z ), 2* Time.deltaTime);

}
else if ( movedir == right){
transform.position = Vector3.MoveTowards(transform.position,Vector3(transform.position.x+1,
transform.position.y, transform.position.z ), 2* Time.deltaTime);

}

Can anyone help with this?

Is this the sort of thing you are looking for?

http://wiki.unity3d.com/index.php?title=Lipis_Runtime_Gizmo
http://forum.unity3d.com/threads/rtgizmo-run-time-position-rotation-scale-gizmo.120007/