- Home /
How to create a Better Trail (trailRender)
How I could make a trail that looked like that of the second picture ? I do not mean that there are two colors , I mean that is placed at a right angle and not as the 1st photo .
Thanks :)
Have you tried using LineRenderer ins$$anonymous$$d of Trail?
You need to know a little about scripting, but with it you can get straight lines like you want. The only down side of it is that you need to pass exact positions for it to work.
http://docs.unity3d.com/ScriptReference/LineRenderer.SetPosition.html
It is the aproach used on this game, Check out the WebPlayer demo: https://84433e25a1114705e52b0e20be308b2547eda70e.googledrive.com/host/0BxEPDwj8HTSJT25BYzRnQXQyVm8/
Thanks now i'm using Linerender, but my problem now is that i have not idea how to control the second element of the position. I can control the first but the second i don't know how. Because using Setposition only i can control the first. $$anonymous$$ight you help me?
// zero for the first
lineRenderer.SetPosition(0, pos);
// one for the second
lineRenderer.SetPosition(1, pos);
// two for the third and so on...
lineRenderer.SetPosition(2, pos);
Your answer
![](https://koobas.hobune.stream/wayback/20220613194252im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to make this trail? 1 Answer
Draw trail behind player when its not moving 0 Answers
How to get a glow/lightning trail effect 1 Answer
Brighter Trail Renderer 2 Answers
How to get Zerg Tentacle-like effect (see example in post)? 1 Answer