mouse_dir3d

The direction vector from the camera through the mouse pointer into the 3D level, calculated from mouse_pos and the view parameters. This vector can be used to trace a ray to or from the mouse position.

Type:

VECTOR, read/only

Example:

function aim_gun_with_mouse() 
{  
  while (mouse_mode > 0)
  {  
    vec_to_angle(my.pan,mouse_dir3d);
    wait(1);
  }
}

See also:

mouse_pos, mouse_mode, mouse_map, mouse_spot, mickey, pointer, mouse_range, mouse_moving, mouse_calm, mouse_time, mouse_left, mouse_ent, mouse_force