Enemy following Player on uneven surface

Hi all!

I managed to make an enemy(character controller attached) follow the player on an even surface. Basically, I animate based on the difference of positions between them:

Player.transform.position - enemy.transform.position

But, on uneven terrains or levels it moves toward the player THRU or flying over them instead of moving on it. does anyone know how to get over this problem?

Thanks in advance.

Are you using controller.Move()? If you simply move the transform of your enemy, it will ignore any collisions. But if you use controller.Move(), the collisions are handled by the character controller. I made this mistake myself, not too long ago...