Check for empty space relative to an object

I have an enemy AI. Right now, the AI simply makes the enemy move towards the player. The problem with it is that the center of the player is taller than the enemy, causing the enemy to float in mid-air. Here is my enemy AI. Yes, this is Boo:

import UnityEngine

class EnemyAI (MonoBehaviour): 
	public target as Transform
	
	private myTransform as Transform
	
	public rotateSpeed as int
	public moveSpeed as int
	public maxDistance as single
	
	private defaultYPos as single
	
	
	def Awake():
		myTransform = transform

	def Start ():
		go as GameObject = GameObject.FindGameObjectWithTag('Player')
		target = go.transform
		
		defaultYPos = transform.position.y
		
		rotateSpeed = 5
		moveSpeed = 3
		maxDistance = 2.3
		
	def Update ():
		Debug.DrawLine (target.position, myTransform.position, Color.yellow);

		
		//Look at the target
		myTransform.rotation = Quaternion.Slerp(myTransform.rotation, Quaternion.LookRotation(target.position - myTransform.position), (rotateSpeed * Time.deltaTime))
		
		//If it isn't too close
		if Vector3.Distance(target.position, myTransform.position) > maxDistance:
			//Move towards the target
			myTransform.position += ((myTransform.forward * moveSpeed) * Time.deltaTime)
		
		if transform.position.y != defaultYPos:
			transform.position.y = defaultYPos

As a temporary fix, I locked the y position. Since I can’t do that for ever, my thought is to check “If the unit under myself is free, move down. Else, don’t.”

So, how would you check for empty space relative to itself?

Since I highly doubt anyone knows Boo, you can answer in C#. I know basic C# syntax, so I can convert it over. Thanks in advance!

I do it like this (basically a Y work around too) and it’s working fine for me so far

Vector3 lookDir = (myTarget.position - myTransform.position);
lookDir.y = 0f;
myTransform.rotation = Quaternion.Slerp (myTransform.rotation, Quaternion.LookRotation (lookDir), rotationSpeed * Time.deltaTime);

I don’t do that in Update() though since I don’t need it calculated every frame (except when the player is in range)