Mouse direction

I am wondering if there is a function or variable that is the mouses direction from the camera through the world. I need it for a phaser to were ever the mouse collides with a collider.

thanks.

Sure:

Camera.main.ScreenPointToRay(Input.mousePosition).direction

is the world-space direction from the camera to the mouse pointer.