I’m drawing a parabola with LineRenderer
The line is displayed without being hidden behind the fence of the baseball stadium.
The fence has a model created with “Pro Builder”.
Even if the camera is placed behind the fence, it does not hide only the back of the fence.
The camera angle is tilted by 50 °.
I used “Line Renderer” for parabolic drawing, do you know any solution?
Development environment
Unity 2018.4.22f1
The line will be depth-sorted with all other objects, so this is more a question of how your materials are set up, rather than a line renderer setting.
Using an opaque shader will make all parts of the line sort correctly with opaque 3D models, but transparent objects cannot be sorted per-pixel, so must appear entirely in front or behind other transparent objects. The default line material is transparent, perhaps you could use an opaque material instead, such as the Standard Shader (or URP/HDRP equivalent).
If the 3D object is opaque and the line is transparent, you should also get correct per pixel sorting automatically.
1 Like