- Home /
Question by
sakis297 · Oct 30, 2021 at 06:25 PM ·
colorlinerendererfill
How to fill with translucent color the space between two lines in Unity3d?
Hello everybody!!! I have created two lines with the same start point by using line renderer. I would like to fill the space between the two lines with a translucent color as the image below. I would appreciate any help.
fillangle.jpg
(70.0 kB)
Comment
Best Answer
Answer by Eno-Khaon · Oct 30, 2021 at 06:50 PM
There are dozens of caveats to this, but the place to get started would probably be to build a Procedural Mesh of 2 triangles between the start and end points of each of those lines. Since both share a starting point, you could simplify it into a single triangle on that basis.
For efficiency, you'd just want to make sure you're using a List<> rather than an Array[] for vertices and triangles.
Your answer
![](https://koobas.hobune.stream/wayback/20220613044816im_/https://answers.unity.com/themes/thub/images/avi.jpg)