How to make Raycast against LineRenerer

Hi everyone, and sorry for my English.

Here is my problem: i got an object with LineRenderer on it, and i need to select this object by clicking on a line that LineRenderer produces. Is there any way to make this happen? The only idea i got about it is getting mesh from LineRender and making a collider of it, but it seems to be impossible.

Will appreciate any help.

Well, the linerenderer itself, if i remember correct, does make a mesh. It creates a line from a plane that will always face the camera.

So, if you add a mesh collider to the linerenderer, then you should be able to cast a ray from screenspace into worldspace and get the information you need from the Linerenderer.

It’s only a theory, and im not sure it’ll work, here’s a few links to the documentation:
http://unity3d.com/support/documentation/ScriptReference/LineRenderer.html
http://unity3d.com/support/documentation/ScriptReference/Camera.ScreenPointToRay.html
http://unity3d.com/support/documentation/Components/class-MeshCollider.html

And here’s a link to the forums, with a topic that is somewhat relevant to your question:
http://forum.unity3d.com/threads/62591-Line-Renderer-Collider

Happy Programming