Y Sort issues
Very easy to fix.
11/4/20231 min read
Y Sort is a setting in Godot that allows sprites to appear in front or behind of another based on their Y positions. A small detail may lead to it not working, but fear not, it's super quick to fix (assuming this is the issue, of course.)
As stated above, Y Sort is a feature in Godot that allows sprites to appear in front or behind of another based on their Y positions. In the screenshot you see beside, the bean should appear behind the counter, but instead, it's sitting on top of it.
Looking through the different sprites, Y sort seems to be setup properly. The counter has it, the Bean's sprite has it. So why is it sitting on top of the counter instead of appearing behind it?
Well, the problem is easy to gloss over and it's just as easy to fix.
THE PROBLEM
Thanks for reading!
I didn't think the problem was something so small, but I'm glad I found a solution for it.
THE SOLUTION
In my scene setup, I have a parent Node2D node that carries all of the environment as its children.
The solution is to turn on Y Sort on the parent node, which my "Environment" node in this case.
As you can see, the bean now properly sits behind the counter instead of on top of the counter.
![](https://assets.zyrosite.com/cdn-cgi/image/format=auto,w=1920,fit=crop/mnlyGOlq0QskXWVl/render_03-m7VEJqbRKpsy1X03.png)