Locking x- axis

Currently I'm using the below code to look at an object, it rotates a capsule towards it: transform.LookAt(Forward1);

I only want it to rotate around its local x axis and to disable the others. I've tried

transform.LookAt(Vector3(Forward1.position.x, transform.position.y, transform.position.z));

But it rotates "90" before the application starts ending up not pointing at the main object at all.

How might I do this?

Thanks in advance!

I think this should do it:

transform.LookAt(Vector3(0, Forward1.y, Forward1.z));

Whichever axis you want to look around, set to 0, that's about it

http://forum.unity3d.com/threads/36377-transform.LookAt-or-Quaternion.LookRotation-on-1-axis-only