I was searching for a simple and straightforward way to get a simple smooth zooming by setting SpringArm lenght using mouse wheel. By default, if you hook it up, the movement is very coarse due to the mouse wheel stepping. I went through quite a few threads but I’ve only found either overcomplicated setups or actual plugins, not a simple blueprint solution. After a while of experimenting, I’ve came up with something simple that works, so I’d like to share it because I am sure someone else will be looking for this in the future
1, InputAxis Zoom event is mapped to mouse wheel axis in input panel of project settings
2, Axis value is multiplied by -1000 to make zooming sensitive enough in the scene of my scale. This will depend on the scale of your scene. You can make it a positive number to invert the mouse wheel zooming direction.
3, Cam Zoom Destination is a variable where I’m storing the destination length of the SpringArm I want to be smoothly interpolating to from the current spring arm length
4, Clamp clamps the range of the Cam Zoom Destination so that the player can’t zoom to far in or out.
5, Interp Speed parameter in the FInterp To node is the actual speed of the transition smoothness. The lower the number, the smoother will the zooming be.
6, Rest is self explanatory, it’s just about hooking it up like on the picture.