- Home /
how to render 3d line on top everything else in the scene?
i am using opengl to render a line, but unfortunatlly i am not able to draw the line on top of everything else. the point is that i am using line to point and mark clearly objects in the scene. but sometimes it happens that line goes through other objects and you dont know where the line points. so drawing on top of everything else i think should solve the problem.
just is it possible?
thanks.
Answer by BoredKoi · Sep 10, 2010 at 02:11 PM
You can render the line using a dedicated camera. Use .depth to control the order in which cameras render (i.e. render the line on top of -everything-), and .cullingMask to define what each camera renders (or not).
http://unity3d.com/support/documentation/ScriptReference/Camera-depth.html
http://unity3d.com/support/documentation/ScriptReference/Camera-cullingMask.html
Your answer
![](https://koobas.hobune.stream/wayback/20220613073022im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
labeling system 1 Answer
using OpenGl to render line works only in Editor not in web player 1 Answer
Drawing Lines with AA 1 Answer
drawing a line following an object 3 Answers
how to render line between gui element and mouse position 1 Answer