put the code for creating a ray from a screen point into it's own function.