i need to use the rotation value of the x axis on a camera

im new to unity and this is bugging me alot..afraid that i cant figure out how to get the rotation of the y axis of a camera. I need to assign it to a variable that i can use in an if then statement. the goal is just to limit the amount the camera can move based on its y axis angle ex. if(yaxis < 61 %% yaxix > 0) { transform.Translate(0, y, 0); }

any help would be appreciated it seems like this should be simple i must just be missing something...right?

Well, you can read the values that get displayed in the Unity Editor, using Transform.eulerAngles. However, Euler rotations are not unique, so you may have to come up with a method that deals with that problem. The first person scripts that come with Unity have examples of how to clamp rotations in a manner that would probably be educational for you.