The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates.

godotengine.org | Twitter

0 votes

So I have been using YSort node and I want to change something. I want to change at exactly what point in the yaxis for a sprite the sort happens. It's happening a little late in one case. The images I uploaded will explain better what I mean. As you can see in the third image I would like the character to appear behind the light. So far I was thinking of putting the light as a child node of another so that the sorting happens based on that since YSort ignores child nodes. But I was wondering if there are other solutions.
Hmm there's a problem with the image upload so here are the links https://ibb.co/5WX3CCg

https://ibb.co/LR0tdhw

https://ibb.co/yQXDK9h

                      ![YSort_1][1]   ![YSort_2][2] ![YSort_3][3]
in Engine by (208 points)

Another way I found was by going to the character scene and traffic light scene and making it so that the base node is at the bottom of the sprite instead of center. Seems to have worked but I am still looking for alternatives.

Hi, I also encountered this problem. Can you give me a step by step on how you made it worked? I already read your comment on making the base node on the bottom of the sprite but I'm not sure how you did it?

Lol I am only now noticing this comment
Did you figure it out?

1 Answer

0 votes

Yeah! Use a Node2D (as a parent to the Sprite) to mark the depth of the nodes.

by (1,003 points)
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.