Y Sort Not Working for Instantiated Projectiles

Godot Version

v4.3.stable.official [77dcf97d8]

Question

Y Sort isn’t working for my projectile objects. I’ve discovered a bug where, if the projectiles are above global y = 0, they’re always rendered on top, and if they’re below, they’re always rendered at the bottom.

I’ve enabled Y Sort for the projectile nodes, all the main scene nodes and of course the TileMapLayer node. Interestingly, Y Sort works perfectly for my character, but I can’t seem to get it to work with the projectiles. The projectiles are instantiated by the ProjectileManager which is signaled by the character, if that’s relevant.

Any advice would be greatly appreciated!

Examples


I found out the reason.
I had made so that all the projectiles that are initialized are spawned under a single node but then I had forget to mark this node specifically as Y Sort Enabled. The problem got fixed when I just marked that node as Y Sort Enabled.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.