Looking for a touch based rigidbody2d.moveposition advice

I am looking to use touch to drag a ball through my scene. I have found solutions that use transform, however the ball is able to move through walls. Fixes for that do not work well at all. Apparently the moveposition function will work, but I am having a horrible time trying to get it to work.

And yes I have searched the internet and unity forums for it and results werent entirely helpful.

Try this …

var speed:float;
var target : Vector3;
var start : Vector3;
var temp: Vector3;
private var pos;
var self : GameObject;
var distanceToObject : float = 7.5;
var dragging : boolean = false;
var sprite:SpriteRenderer;
function Start()
{
start = transform.position;
pos = transform.position;
sprite=GetComponent(SpriteRenderer);
}
function Update ()
{
   transform.position.z=0;
 if(Input.GetMouseButtonUp(0))
 {
if(dragging)
 {

dragging = false;
}
}
if(dragging)
 {
pos = Input.mousePosition;
pos = Camera.main.ScreenToWorldPoint(pos);
temp = this.transform.position;
transform.position = Vector3.Lerp(temp, pos, speed*Time.deltaTime);
 temp.z=0;
}
}
function OnMouseEnter () {
 Destroy(self.GetComponent(Rigidbody));
dragging = true;
	
}