Simple enough. Needed to move the collision detection before the trigonometry and have it modify the distance to target and then have my trig calcuations use that to figure out the postion.

Somthing like...


// zoom with mousewheel
cam_dist-=integer(mickey.z);
cam_dist=clamp(cam_dist,mindist,maxdist);

// Find objects between player and camera.
var dist=c_trace(my_entity.x,vector(camera.x,camera.y,camera.z),IGNORE_ME|IGNORE_PASSABLE|IGNORE_MODELS|IGNORE_SPRITES);
if(trace_hit == 1)
{
cam_dist=clamp(cam_dist,mindist,dist);
}

// do some trig to find camera location and then aim it at pFocus
camera.x=my_entity.x+cos(cam_ang.pan)*(cam_dist*cos(cam_ang.tilt));
camera.y=my_entity.y+sin(cam_ang.pan)*(cam_dist*cos(cam_ang.tilt));
camera.z=my_entity.z+sin(cam_ang.tilt)*cam_dist;
vec_set(temp,my_entity.x);
vec_sub(temp,camera.x);
vec_to_angle(camera.pan,temp);


Not perfect by a long shot, but a step in the right direction.