Simple AI Rotation Issue -

Currently I’m using LookAt to have my AI turn towards my hero when he comes close - he sort of just snaps to the rotation. I’m trying to make him turn in a more fluid way and also to stay locked perpendicular to the ground. I know it is an easy fix, but my brain is fried on it! Any help would be appreciated! Thanks.

This is probably what you want.

var direction = target.position - transform.position;
direction.y = 0.0;
transform.rotation = Quaternion.Slerp(transform.rotation, Quaternion.LookRotation(direction), turnSpeed * Time.deltaTime);

direction being a Vector3 representing the direction to the target (the player, or whatever you want the target to be). Since the character is running on the ground and not flying, the y value is set to 0. Then it uses the Slerp function to rotate to the value over time. For the time value in this case, I use a float called turnSpeed and multiply it by deltaTime.