Using Trail Renderer to draw vertical trails or walls can produce incorrect results when the object has a non-zero Z transform or moves in 3D space.
The issue is discussed here:
https://discussions.unity.com/t/vertical-line-using-line-renderer-with-transform-z/762604
VerticalTrailRenderer-script that generates a mesh, to draw vertical trail.
It records object movement and builds a vertical quad strip using a Mesh rendered by a MeshRenderer.
- vertical trail generated from movement points
- configurable lifetime and fade
- no GC
- full rendering options (render layer ,shadows, probes, bounds etc)
- optional double sided geometry
- install as package by Git URL
- Place the script
VerticalTrailRenderer.csanywhere insideProject/Assets/in a Unity project
- Add the script to a GameObject.
- Assign a material to
_trailMaterial. - Move the object — the script generates a vertical trail mesh automatically.