Camera smooth look at modified

Hi, im new to unity scripting and im having dificult time trying to customize smoothlook camera, and i have to ask you guys for help.
The camera i need is like SmoothLookAt thats not child of a player, just targeted, follow the target after some distance, and if the target comes too close it adjust to not pass inside the mesh, (go to the players back or something like that) and last is not go thru the terrain or walls.

Thats all i guess, its too much to ask, im making that cam to be orbit and go first person too…
thanks for replies and thanks for help i really want this i just need that!

That’s way too much to ask… a fellow student of mine was dealing with that for over 2 months at university to get a perfect orbit camera to work. And that was in a scene with big obstacles.

Tried looking at: Unity Asset Store - The Best Assets for Game Making ?