Min and Max Camera vector displacement with mouse wheel?


Okay, so here we have the code I’m using to make the camera move back. Currently it gets attached to the head socket of the Skeleton Mesh on Begin Play too, which is how I get my view to bob around.

I know the numbers I want for my max zoomed in (Thus what I want to branch from mouse wheel up) is the upper number of these.


How would I make it so that the scroll wheel up doesn’t displace the camera more than that vector?


You need to compare the relative current position of the camera with the maximum and minimum values. For example like on this picture.