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