camera collisions, i have an idea...

we're making a third person puzzle game, and i need to use 'mouseorbit' for general movement (smooth follow is a no go, we all hate it) i've decided to modify the script so that it doesn't let the camera go through walls. now, how id' like to do this is have the camera's 'distance' fromt eh player switch smoothly by going to different points on a ray cast being from the orbiting camera to the player, how do i do this? i thought of casting multiple rays, in the direction of the player from the camera, to 'set' different points which i'll store from the Raycasthit.point of each raycasthit variable that i use. any better ideas?

i find myself coming up with some sort of solution every time I'm asking a question, still, i wouldn't delete this answer in hope of better ideas :) moving the camera with physics is not an option, or atleast i think i don't need to go in that i?

yes, i am answering my own question you inquisitive website!! here's the answere, a prefab i made :)