ue5 clamp camera relative to actors/controllers rotation?

Not exactly sure how to figure this one out.

I have my character lean up against the wall by turning him around so his back is against it by using the sphere trace hit normal of the wall, and have him covering and moving along it just fine, but I want the ability to have the character look around the corner. So far, I have it so the spring arm offsets the camera off to the side I am currently facing and the spring arm brings you closer so you peep around the corner without exposing yourself.

How in the world do I clamp the camera/spring arm rotation so that I can only look around the corner only so much… If you turn too much you can start seeing around behind things you really shouldn’t, or you full turn and have camera against wall…

I have tried so many things, but the camera uses the controller rotation so setting the rotation of the camera itself is not viable I don’t believe. Also, struggling to figure out the math I need to use to clamp in the direction I am leaning against the wall specifically…

Setting the view yaw looks promising, but I cannot for the life of me figure out the math to get the correct direction sense it must be using world values. I got the pitch clamped just fine on begin play.