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?