Function Camera.projectPosition

Returns the 3D point in worldspace that maps to the given 2D coordinate in the Viewport rectangle on a plane that is the given z_depth distance into the scene away from the camera.

Vector3 projectPosition (
  const(Vector2) screen_point,
  const(double) z_depth
) nothrow @nogc const;