3d Text rendering over scene objetcs

I added a 3d Text game object to the scene. But the text is rendered "on top" of all the other elements on the scene. How do I change this so that the text is rendered correctly, behind the character?



Use this shader on the wiki, which uses the z buffer.

UPD: I was able to fix the problem by replacing ZWrite On with ZWrite Off

If you don’t want to mess with shaders, maybe you would like to just use:
GameObject -> Ui -> Canvas with “Render Mode” = “World Space”
GameObject -> Ui -> Text inside of it?
It takes obstacles into account when rendering text.

Make sure the walls have materials with “Transparent/Diffuse” shaders.

I was having the same problem, with text showing through a Quad.
I then changed the shader on the Quad, and the text stopped showing through.
Hope this works!