Okay, here we go!
This system is meant to be pulsed every tick. It requires you to create a single Vector variable (Last Desired Camera Pos) which is persistent across the BP (i.e. non-local to the function). It also requires that you DO NOT adjust the position of your follow camera component, as this breaks everything (since I’m using the follow camera’s position to get the world space location of the end of the boom, doing transform inverses for the Socket Offset variable was not working properly). The solution, IF you want to do that, is to instead create a separate Vector variable (I’m using Final Gun Cam Offset since I was adjusting the camera offset for aiming and iron sights, but you can use whatever) and instead set THAT where you would normally set the Relative Location of the follow camera in the BP. Also note the vector float node at the very end (where I add a vector with about 66 Z and nothing else); this vector represents the DEFAULT value of your Socket Offset variable, which you may have used (I did) to adjust the default camera height or position on the player.
The system takes two vector inputs: Lag Speed and Max Distance. Both of these specify control-rotation-specific directions based on YAW in my example (so X is always forward, Y is always side to side, and Z is always vertical, regardless of rotation). The Lag Speed vector adjusts the individual FInterpTo node interp speeds, i.e. lower values are slower lerps. Max Distance uses absolute values to specify a range of Unreal Units distance from the center of the screen the player is allowed to travel before the camera “locks” and refuses to allow him to move further away, i.e. a Y value of 60 prevents the player from moving further than -60 or 60 away from center screen, and if he does the camera will update to keep him at either -60 or 60.
Note that the Max Distance node uses a hard cap applied at the end of the lerping, meaning adjusting that value dynamically at run time will snap the camera around. It is meant to be used with SLOW lerp settings, i.e. you set a lerp value very low for a drifting camera effect, and then use the cap to keep the player from wandering off screen entirely. If you want to pull the camera tight to the player (in my case, I use this for when aiming the gun, to avoid the player’s shoulder obstructing the reticle), I recommend instead drastically increasing the interp speed, using either a Select Vector node, a VInterpTo node, or a Lerp V node. This will cause a more distant camera to “yank” in to the player, which IMO looks better.
Obviously, this works best if you disable the native Camera Lag functionality. As far as I can tell (perhaps UE staff can correct me?) the units I’m using are the same ones Epic use, so you should be able to get identical behavior to current 4.7 camera lag functions by setting all 3 values of the Lag Speed vector to the Lag Speed float and all 3 values of Max Distance to the Max Distance float from UE’s component defaults, and then modify it from there.