- Home /
Achieve a "stroke" / "transparent" effect with the Line Renderer in 2D
I would like to be able to draw lines that have "outlines" and do not have any color inside. When the lines overlap, the ones below need to be visible. I guess I am trying to achieve something like the "Stroke" effect in Photoshop with the Fill set to 0%. I am trying to achieve something like this:
Unity's Line Renderer doesn't seem to offer an obvious/easy way to do this. There doesn't seem to be a way to add a stroke/outline to a line. I am aware that I can have 2 Line Renderers on top of each other (one with a shorter width than the other) to achieve a "stroke" effect. However, this doesn't solve the "transparency" issue and I will just end up with something like this:
Is there a way to achieve such an effect?
Note: Keep in mind that the ends of the lines need to be rounded (I am currently using End Cap Vertices with the Line Renderer)
Your answer
Follow this Question
Related Questions
What's the best way to draw a 2D line WITHOUT using LineRenderer? 1 Answer
How can I Disable all but one renderer in an array? 1 Answer
Line renderer spring shape 1 Answer
LineRenderer lagging behind 1 Answer
Draw out Line in C# 0 Answers