I been trying for a while to draw smooth lines in Unity but with Line Renderer I obtained only jagged lines with the corners not rounded, in particular when the angle of curvatu
I obtained only jagged lines with the corners not rounded, in particular when the angle of curvature is really small .
This was a problem in Unity 5.4 and below. This problem has been fixed in Unity 5.5 and above after LineRenderer
was completely re-designed.
All you have to do is update to Unity 5.5 or version above and this problem should go away.
There is a new variable called LineRenderer.numCornerVertices
. You can use that to set how smooth you want the line to be. The value of 5 seems fine for this.
There is also another new variable called LineRenderer.numCapVertices
that can be used to set how smooth the end of the line should be.
This is a screenshot that demonstrate between 5.4 and 5.5 the changes: