0 votes

I'm working on a top-down RPG and I've been having trouble with YSort.
The Node is above everything I want to be sorted, Sort? is enabled, and all the Z-Indexs are on 0.
When I'm in the editor, YSort works, but when I run the game, YSort doesnt do anything. I donut understand and it is driving me mad.

Godot version 3.2
in Engine by (18 points)

1 Answer

+1 vote

Y-sort nodes render their children according to their y-positions, not sibling nodes that are underneath it. Are the nodes that you want sorted children of the y-sort node or are they siblings?

Quick guide on how to use y-sort nodes: https://kidscancode.org/godot_recipes/kyn/ysort/

by (3,768 points)

i said in the question they were children. and i checked and they are.

"is above everything" is pretty ambiguous language. The guide I linked shows both the basics of how to use it and how to resolve the most common issue people experience with y-sort nodes. Did you check out the guide? If so did it resolve your issue? If not please post pictures of the issue you are experiencing.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.