How to use ScreenPointToRay for orthographic cameras

Hi! So I have the ScreenPointToRay working for perspective cameras, but how would I use it for orthographic cameras?

My code currently:

        Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
		RaycastHit hit;
		if (Physics.Raycast(ray, out hit)){
			//Do stuff
		}

Ok, so apparently if you have your camera’s far clipping set to a stupidly high number, the ScreenPointToRay doesn’t work properly. If you change it to a normal number, it should work properly. At least, that’s what caused the problem for me.