- Home /
Line Renderer appearing behind object
Hopefully the picture should be clear from the image, the line is rendered behind my background image, inspite of being clearly in front it. The top image show the editor view, with the line on the right, between the camera and the plane. The bottom image is the game output, with the line being behind the plane.
Update
To emphasise, in the editor it can be seen that the line is between the plane and the camera. The line originates at the fighter which can be seen at all times in front of the plane. Weirdly, as you move the (editor) camera about, although the line is in front of the plane, it disappears as it would were it to be behind.
Answer by thk123 · Jan 22, 2014 at 04:57 PM
The shader was the issue. I was using GUI/TextShader to get a block colour without taking in to account lighting. I suppose this shader works in a different way or else is in some early pass or something.
Anyway, changing to Self-Illumin/Diffuse resolved the issue.