I'd just c_trace for the first hit, then use the resulting hit distance as the factor for the mouse pos calculation:
hitDistance = c_trace... // calculate once on first click ... vec_set(temp,mouse_dir3d); // dir, not pos! vec_scale(temp,hitDistance); vec_add(temp,camera.x); => move to temp
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual