Adjust LookAt

I use the LookAt() function so my player will look at a character when the character gets next to him. Before doing that, the player can move around the scene using the W key and mouse as a first person. When the character is next to the player, I disable the player’s ability to move and then do the LookAt() function. It does fine to point the player to the character. The problem is that if the player was looking at the ground or the sky before the character got to him, the player continues to look in the same direction, either up or down, though his body is pointing toward the character. I was wondering what command I need to use after the LookAt() command to have him look perfectly horizontally and not up or down.

[Answer] I found the problem. The player is a capsule and its eyes are a component camera. I was having the capsule as the transform for the LookAt() instead of the player’s eyes (the camera). By using the camera’s transform, it correctly points to the character using Lookat(). regardless of what it was pointing at before.