Create a mesh collider for a user drawn LineRender

I have a program that draws a line using the mouse. Does so through unity LineRenderer. Once the mouse button is released the Object with the line renderer is copied so that another can be drawn. The copied object is assigned a rigid body and a box collider for collision detection.

This works great as long as im drawing straight lines. However not so well with circles and diagonal lines. I tried assigning a mesh collider but cant get a way of reading the linerenderers elements to assign the mesh its vertex’s.

I know there you can change the linerenderers position but cant figure a way to read the current position.

In essence i am asking if there is a way to read the linerenderers element positions allowing me to create a mesh collider for my drawn ‘object’ or if any one can think of another way to draw objects in game that have rigid bodies and colliders?

Thanks in advance. Been scouring the net for a while trying to find a solution and this will hopefully stop me from tearing my hair out

Ok, after checking the Reference, I couldn’t find a way to get positions out of the LineRenderer itself. However, it is probably a bad idea for user drawn shapes to use a MeshCollider.

I would suggest you use a thin BoxCollider between every 2 points of your line, which you can do easily when you add the next points to your LineRenderer (you just have to save the last point).