- Home /
LineRenderer objects are clipped/culled early
I am using a simple 2 point LineRenderer with a fairly thick line (E.g. the line is the height of the view and is a 1/4 of its height in thickness). In a test case, where it points straight up, as soon as the two points that describe the line go offscreen (for example by tracking the camera left) the line seems to be clipped and stops rendering. Since this line has thickness however half of the line should still be seen but, as the whole line stops drawing, it causes a pop appear/dissappear as you track the camera left and right.
I'm just asking if there are any get-arounds or if I am doing something wrong before I report it as a bug. I'm a little surprised that no one else has found this and so hope I'm just doing something silly.
It doesn't matter if you use world or local coords too. The line is drawn with a standard mobile additive particle shader and this problem is seen in the editor and on an Android device.
Thanks
I am having the same problem! I'll let you know if I figure out a soltion.
Answer by AlwaysSunny · Aug 29, 2014 at 10:15 PM
This issue is related to how the camera judges whether an object should be drawn, and how Unity creates and renders LineRenderer meshes. I never found a bulletproof workaround that involved LineRenderers.
There are other ways to draw lines that are typically superior, such as procedural quad meshes used with the Graphics.DrawMesh() method.