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)
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: