The following gets the postition of the mouse cursor in 3d coordinates and lets the my entity rotate to it:

Code:
VECTOR to;
VECTOR temp_dir;
ANGLE offset_angle;

vec_set(to, mouse_dir3d);
vec_normalize(to, 500); //play a bit with 500
vec_add(to, mouse_pos3d);
vec_diff(temp_dir, to, my.x);
vec_to_angle(offset_angle, temp_dir);
my.pan += ang(offset_angle.pan - my.pan) * 0.2 * time_step; // smooth rotation code



Is that what you was looking for?