Increase/Decrease Spring Arm Length from Camera Pitch

I’m working on a third person project and I need help with the camera.

How do I Increase/Decrease the camera spring arm length based off the camera pitch?

Effectively, I want the camera to zoom in/out depending on the pitch of the camera (i’m moving the camera using R-stick)

Thanks!

You could try multiplying a distance by the sine, cosine or tangent of the pitch angle to calculate the spring arm length.