Y-sort isn’t working properly and I don’t know why.video of Y-sort not working
Hi there, it looks like it’s working properly. It sorts by y position and since the tree is taller than the player, it really does have a lower y position until the player climbs up it a bit. I usually have to edit the extension to
for that same reason.
Behaviors are made up of events, you can open their content and change it, just changing the z-order of the tree probably wont work because the behavior is overwritting it.
By default the z-order is based on the Origin point of the object, which is normally in the top left corner of the object, and for the z-order to work as expected, you need a point at the bottom of the object, so you either need to create a new point in the object for z-order, and then use the action to change the z-order to that point (for all objects that should work with z-order), or you can move the origin point to the bottom - as long as you are not using the Origin point for anything else.
Are you doing the same for the player? If you do it without the behavior, stationary objects would only need the z-order set **at the beginning ** while moveable ones would need to be updated on each frame without any conditions.
I edited the points, it’s working now. Thanks to all of you.