0
\$\begingroup\$

Y-sort is not working how I would expect in Godot. I have a player sprite, their feet are at the origin. I have a y-sorted tile layer. The mushroom base is at the bottom of the tile, it doesn't start in the middle or anything.

When I stand in front of a mushroom title, it displays in front when it should be behind. If I step down just a bit, it finally pops behind. It seems like Godot thinks that the y-position of my player is near their center. I don't know why.

What other steps need to be taken to make y-sort work as expected?

enter image description here enter image description here enter image description here enter image description here

\$\endgroup\$

1 Answer 1

0
\$\begingroup\$

This is a terrible solution, but changing y-offset for the character sprite to some random position mostly fixed the issue: enter image description here

\$\endgroup\$
2
  • \$\begingroup\$ I noticed this "Centered" checkbox in your screenshot. What does that do? Maybe that's the problem? (Just guessing) \$\endgroup\$ Commented Jul 9, 2023 at 16:10
  • \$\begingroup\$ There's an origin position ("+" symbol near her knees). If disabled, that becomes the top left corner of the sprite. \$\endgroup\$
    – Seph Reed
    Commented Jul 9, 2023 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .