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 curvature is really small . I incresed the value of antialiasing in quality settings and tried different materials but nothing changed. I also tried to instantiate a sphere every time the mouse move but it creates some gaps between the various spheres, in particular when the mouse go fast. I know there is a plugin called Vectrosity for this but there is a way to achieve this whitout it?
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]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With