Camera Zoom

Hey, I know how to zoom in with the camera, BUT I do not know how to make it stop at a certain spot. I searched the forums several times before I made this post and found nothing. I tried using an invisible plane to stop the zoom, but this will not work for an FPS due to the fact that you would have to be in a weird position before zooming. Can any one explaon how to do this for me? Thanks!

You could just do have a property called “zoom” that would be a float from 0 to 1 with the amount of zoom on the camera (0 is min, 1 is max). Then say you have points a and b where a is where the camera starts and b is where the maximum zoom should be. You just set the camera to position p to
p = a*(1-own[“zoom”]) + b*(own[“zoom”])

This will set p closer to a if zoom is low and closer to b if zoom is high. But will never get after b or before a.