The angle in forward axis between two points.

Hi, guys. I need your help.
I have one game object and a point on space that I got from a Ray casted from the main camera. I tried very hard to make this object aim to that point just in the forward axis, like a Sidescroller shooter, where the mouse pointer is the aim of the gun (up and down only). I tryed everything but something is wrong… please advise.

void Update () {
	
	if(Physics.Raycast(camera.ScreenPointToRay(Input.mousePosition),out hit, 100))
	{
		targetLook = hit.point;
		//now i need to make my object aim to the targetLook, but only on the forward axis.
		//I tryed using Atan2, that I usually do with Flash based games, but in 2D Space..
	}
}

Appreciate any help!

What’s wrong with Transform.LookAt? if the object’s center and the point are on the correct plane (defined by the object’s up vector and it’s center, if I understand correctly), or said differently, if both object and point have y == 0, it should be ok.