set bounds for smoothfollow2d script

Dear CommUnity,

I like the clean SmoothFollow2D Camera Default Script. However, I’ve got no idea how to get the camera to stop following when it reaches the bounds of the level. I just tried some if statements, but the cam then immediately stopped at the level bounds. I’d like the camera to smooth-stop when it reaches the level bounds.
Any suggestions?

Thank you very much!
moritz

you need to look at :

basicly grab your last position where you want the smoothing to begin and lerp it to it’s destination