ignore height distance in distance?

How do get an object to reference only anothers position without looking at its height?

if ( Vector3.Distance( leader.position, transform.position ) >= distance) {

basically, how do add into this equation to ignore height in the distance?

Thanks

You just use the same y value for both vectors:

var currentPosition = transform.position;
currentPosition.y = leader.position.y;
if ( Vector3.Distance( leader.position, currentPosition ) >= distance) {