Didn't know mouse_pos3d before.
Maybe, you could move an entity parallel to the view the following way:

Code:
function move_with_mouse() 
{  
  VECTOR to;
  if(mouse_left&&mouse_ent)
  {
    set(mouse_ent, TRANSLUCENT);
    set(mouse_ent, LIGHT);
    vec_diff(to, mouse_ent.x, mouse_pos3d);
    vec_add(to,mouse_pos3d);
    vec_set(mouse_ent.x, to);
  }
}