don't include vertical distance?

I have this code

while(Vector3.Distance(player.postion + player.forward*3 , transform.position) > .5){
transform.LookAt(player.postion + player.forward*3);
//code to move forward
yield;
}

How do I properly tell it to ignore the players vertical distance? Thanks

Edit:
a picture ref: I hope this makes things clearer, if not tell me. I will try again
alt text

just create a new vector that uses the object’s y position rather than the player’s:

Vector3 temp = new Vector3(player.position.x, transform.position.y, player.position.z)

The easiest way to get the distance between two vectors if you want to ignore height (or an other dimension) is

var a : Vector3;
var b : Vector3;
function Start() 
{
    print( "ignoring height, the distance between a and b is " 
                         Vector3( a.x-b.x, 0, a.z-b.z ).magnitude );
}