Smoothing Camera Along Specific Axis

I am having trouble figuring out how to smooth camera movement when it detects an obstruction. It’s not so bad when detecting a collision, but when un-detecting and going back to its original distance, the effect is instant and it can be quite jarring in an environment with many potential obstructions. I would prefer the camera to smoothly transition instead, but I can’t figure out how to convey this through code. VInterpTo seems like the obvious choice, but I am having trouble getting it to only do so when colliding/un-colliding, and to ignore smoothing when moving the camera with the mouse.

I’m using a var that is the distance to the camera objetive. When detects a collision, the camera location is set to the hitlocation, and the distance var is updated using vsize(hitlocation - pawn.location).
Then a vlerp do the job when the camera location returns to the normal distance. In this way the return is smooth.