Orthographic camera ignoring depth?

I have a 2D game where I’ve put different sprites on the scene on top of each other, but it seems that the orthographic camera I use ignores depth, and therefore some sprites that should be in front of the others, don’t show up, just sometimes, or just behind the actor that I’ve put behind them.

When I switch to perspective mode, everything works fine. The problem with that is that I need an orthographic camera( I’ve got a sprite that follows the finger of the player where the screen is touched, and this only works with orthographic properly)

Is there a workaround?

bump? anyone has a solution?

Have all your 2d Flipbooks have translucent materials and fiddle with the sort order.

What if I’m using sprites created straight from images, no flipbooks or particular materials? They’re all using TranslucentUnlitSpriteMaterial.

Hi everyone,

Unfortunately Orthographic cameras are not intended to display depth. I did just check on my end and layers still appear to be working correctly, however once the game is run the orthographic view will not display depth, whatever is closed to the camera will appear on the topmost layer. For additional information on orthographic cameras, please take a look here:

If you are looking to display depth in a 2D environment, you will need to utilize a perspective camera positioned to display depth while maintaining a 2D view. You can find additional information on perspective cameras here:

I also encountered the elements in the orthogonal camera scene that have no hierarchy to the back and forth.

How do you solve this problem?

There should be some way to change that through some sort of sprite zorder, like you would in UMG. Can you change the position of the sprite in the z axis?

Yes, I did it now, because I changed the material, The material has an Alpha before。

I know this post is older than hell ,but I found that using this feature on 4.20 respect depth even in orthographic cameras.