Function amethyst_rhusics::pick_ray_ndc[][src]

pub fn pick_ray_ndc(
    window_pos: (f32, f32),
    camera: &Camera,
    view: &GlobalTransform
) -> Ray3<f32>

Generate a ray for picking, based on the clicked position in normalized device coordinates.

Parameters:

  • window_pos: clicked position in normalized device coordinates, i.e. in the range (-1..1)
  • camera: Camera, used to convert from screen space to eye space
  • view: camera transform, inverse transform used to convert from eye space to world space