I have something that rotates the camera when hitting a wall a certain direction, and returns back when leaving the wall. And ive found that you cant change pitch and yaw at the same time since the rotation gotten from the springarm can break the camera position very easily. Is there a way to rotate pitch or yaw independently from one another without providing other rotation positions?
Easiest is to use components hierarchy tree.
Place component (may be arrow or static mesh, make it invisible in game), name it horizontal rotation.
Place another component like previous, on top of that horizontal rotation component , but name it vertical rotation.
Then place camera arm of top of vertical rotation component.
Now you have 2 components that you rotate separately. One warning though watch how they are oriented each to another, if one is rotated for eg 90deg, second will inherit that rotation same goes for scale. So match both rotation components to have same rotation. I usually solve this by having 3rd component that i name Camera Root and set it to rotation i want (like default camera orientation), then both rotation components set to 0,0,0 rot.
Ps.
I set rotation (add rotation) directly from blueprints. Small camera lag (set in camera arm) works better than timeline smoothing, but that needs on tick update for camera.