Create 3D Room based on Line Drawing
<p>I'm provide LineRenderer to draw the shape of Room in 2D and store the LineRenderer position values in DrawLine.storeLineRenderers list.(List2>)</p>

<p>My plan to create 3D room using 2D Shape , i.e LineRenderer's.</p>

<p><a href="https://i.stack.imgur.com/tDin2.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tDin2.png" alt="enter image description here"></a></p>

<p>Following code gives convert to 3d, but not accurate</p>

<pre><code>for(int i=1;i&lt;=noOfLines;i++)
    {
        LineRenderer line =GameObject.Find("line" + i).GetComponent&lt;LineRenderer&gt;();
        if(line!=null)
        {
          Vector3[] ss=  DrawLine.storeLineRenderers[i - 1];
          print(ss[0]);  //Position Element 0 value (Vector3)
          print(ss[1]);  //Position Element 1 value (Vector3)

            //generate 3d box (wall) here
          GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
          cube.name = "wall" + i;
          cube.transform.localPosition =new Vector3(ss[0].x,ss[0].y,ss[0].z);

          cube.transform.localScale = new Vector3(ss[1].x - ss[0].x, ss[1].y - ss[0].y,ss[1].z - ss[0].z);

        }
    }
</code></pre>

<p><strong>Output</strong></p>

<p><a href="https://i.stack.imgur.com/E1j7v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E1j7v.png" alt="enter image description here"></a></p>

<p>How to solve this?? Is there any formula to create properly??</p>

<p>thanks in advance...</p>