Line/Trail Renderer Upgrade

Line/Trail Renderer Upgrade (5.5)

The LineRenderer, which renders a line between a specified set of points, and the TrailRenderer, which renders a trail behind a moving object, have both been upgraded to use an improved line drawing algorithm.

Additionally, the settings for both have been improved and made more similar between the two components.

Widths

It is now possible to define a curve to control the width of your lines and trails at various points between its start and end, instead of just a start and end width. The curve is only sampled at each vertex, so its accuracy is limited by the number of vertices present in your line.

Colors

As with the widths, you can also control the color of your lines along its length, using a Gradient. Again, the color is only sampled at each vertex.

Sharp Corners

A longstanding problem where lines rendered incorrectly when using sharp corners has been fixed. Lines will now try to maintain their width regardless of the angle between segments.

Rounded Corners

There are 2 new UI options for adding extra vertices at the ends of lines, and also at the corners between segments. This allows for smoother lines.

Scripting

Lastly, the LineRenderer and TrailRenderer components are now fully exposed to script!

Leave a Comment

Your email address will not be published. Required fields are marked *