How to fix sprite overlap

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By LurreAllire

The problem I have is that I want to let the player overlap the bush to a certain height.
I could only do that with the bottom but I don’t know how I can stop the overlap from the top.
Any idea how to fix this?

See Images

:bust_in_silhouette: Reply From: jgodfrey

Take a look at the YSort node in Godot. That’s exactly the problem it’s intended to solve:

Here’s a few YouTube videos on YSort (there are lots more):