OnMouseDown from distance

I have a bunch of code that happens inside the OnMouseDown function to happen when I click a box. I thought it wasnt working at first but then I realized that if I get the camera REEAALLYY close to it it does work, this is not good enough tho. Is there a way to make a 3D object clickable from far away?

@ricardoaffonso Check this out for the fundamentals to understand how:

Here is a document that I found that seems to do what you would like to do. Answer by @dannyskim