#Setting a Node to draw on a different layer or without Y-Sort.

5 messages · Page 1 of 1 (latest)

slender wyvern
#

I have a layer (by layer I mean a Node2D) in my world which handles all Y-Sorting and it works great. The player goes here, the enemies go here, and any object where it would make sense goes there. Easy.

The issue is that I have something now to where the main sprite should be Y-Sorted, but there's a TextureProgressBar and a Sprite2D that I want to always draw below the entities within the Y-Sort. The issue is that they're a parent of a node being Y-Sorted. Is there anything I can do in code to modify how these are drawn?

See attached. I want everything in Interaction to always draw below, but everything else can be Y-Sorted. I'm looking for a way to kind of have certain nodes opt-out of being Y-Sorted, if that makes sense.

I was thinking I could just push these to their own node and simply not have them be under the Y-Sort node, but that feels pretty clumsy.

For the record, the frost_sculpt main node here is not Y-Sorting, but it will be placed as a child of a node that is.

tough hearth
#

You could do the easy approach and use a negative z-index?

slender wyvern
#

Oh wait, I do see it. 👀

#

Yes, that works. Thank you.