Min and Max Camera vector displacement with mouse wheel?

http://puu.sh/il6Rm/b889d1eeba.jpg

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.

http://puu.sh/il73w/3a01678f06.jpg

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

Hi!

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