- Home /
Sprites rendered in the wrong order
Hello
I'm using sprites in a 3D world and I have this bug when two sprites are too close :
http://img15.hostingpics.net/pics/878844spritewrongorder.png
I read it's a common bug and I should use "sorting layer"...
But I can't, when the man goes behind the tree I don't want to see him in front...
What could I do to make it work ?
Answer by Eric5h5 · Dec 28, 2013 at 09:25 PM
Use the sorting layer (or order in layer), and change it in code as necessary depending on the position.
Thank you Eric5h5, it seems to be the only solution
But I can't find any information about sorting layers in the scripting doc :
http://docs.unity3d.com/Documentation/ScriptReference/SpriteRenderer.html
Where could I find help ?
Look in the local docs; for some reason the online docs aren't complete.
Your answer
Follow this Question
Related Questions
How do I set the rendering order of objects with the same sorting layer and order? 1 Answer
Do Mesh Renderers for textures on quads have a sorting layer for 2D games? 1 Answer
In Unity 4.3, how can I programatically create and change SpriteRenderer Sprite and Material with C# 1 Answer
Sorting Layer Logic Issue 0 Answers