Trail renderer jitter when using positionCount
In certain parts of my game I want to “fake” a trail by overlaying a line renderer over a trail renderer. My first attempt was to continuously call GetPosition(trailRenderer.positionCount-1) on my trail renderer and adding it to the line renderer once on every fixed update. After testing I noticed that whenever I use trailRenderer.positionCount once per fixed update it causes a jitter in the trail renderer, even if I don’t do anything with the information or if I just print the result using Debug.Log (though strangely enough the lineRenderer made with those same points turned out smooth). I’ve managed to find a workaround by using the trail renderer’s current position instead of its last position, but it still seems strange that using a property’s getter should change how it’s rendered. I haven’t seen anyone else mention this and it’s not a huge deal, I’m just curious if anyone else has seen this same thing or if I’m doing something terribly heinous haha.
Your answer
![](https://koobas.hobune.stream/wayback/20220613051349im_/https://answers.unity.com/themes/thub/images/avi.jpg)