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
You can get some good results by generating a mesh from a set of points.
The algorithm for it is as follows:
v = (p2 - p1)
(marked in blue). Then rotate that vector by 90 degrees normal = v.y, -v.x
marked in red.[i, w/2 + i, w/2 + i + 1]
where i
is the current index, and w
is the total number of vertices.[i, w/2 * i + 1, i + 1]