Hey y’all.
Im rotating an enemy object towards the player by using Quaternion.Slerp. This allows me to use a dampening variable, as I dont want to have the enemy instantly facing me.
I then translate the enemy along its forward vector to move towards the player. The problem is, that with Quaternion.Slerp I cant find a way to limit the rotation to the y-axis (or lock x and z rotation if you will).
I could just use transform.LookAt where I know how to lock the rotation around a given axis, but I dont know how to add a dampening factor using that function. any clues? 
There are probably more efficient ways to do this, but you could just create a Quaternion for the second part of your Slerp function and just remove the x and z rotations from it.
Quaternion to = Quaternion.LookRotation(player.transform.position - transform.position);
to = new Quaternion.Euler(0, to.eulerAngles.y, 0);
transform.rotation = Quaternion.Slerp(transform.rotation, to, Time.deltaTime);
Or you could remove the x and z rotations before you construct your Quaternion.
Vector3 direction = player.transform.position - transform.position;
direction.y = 0;
Quaternion to = Quaternion.LookRotation(direction);
transform.rotation = Quaternion.Slerp(transform.rotation, to, Time.deltaTime);
Just so you know, these examples are in C# and not tested.