Bullets fired via “Danmaku Launch” may render behind the emitter

Good evening. This may be by design, but I found it slightly inconvenient, so I’m reporting it here.

While testing the “Shoot Bullet Pattern” action in version 2.1.1, I noticed that the bullets in the bullet pattern are being drawn behind the object that is shooting them. Since this wasn’t the case in the sample project, I checked what was different and found that the Z-index values were different.

When an object with a Z-index set to 1 or higher shoots a bullet pattern, the bullets are drawn behind the shooter itself.

If this behavior is part of the design for optimization purposes, then I understand prioritizing optimization. However, if that’s not the case, I would appreciate it if the bullets could be drawn in front of the source object. (Ideally, it would be great if the Z-index could be configured.)

Thank you for your time and consideration.

I was able to replicate this, thank you for the report!

From what I’ve found, every barrage bullet is drawn at Z Index 0 no matter which object fires it, so an object with a Z Index of 1 or higher gets drawn on top of its own bullets. Display Priority only sorts barrage bullets against each other, so raising it doesn’t help here.

I’ve made a formal request for a setting on Fire Barrage that controls this. Until then, I made a custom action that changes the Z Index the bullets are drawn at:

BazSetBarrageZIndexAction.gd (5.1 KB)

Drop the file anywhere in your project folder. I keep mine in a custom_actions folder. You’ll find Set Barrage Z Index on the Baz tab when you add an action. Run it once before your barrage fires, in the object’s first state for example, with a Z Index higher than your object’s. It changes all barrage bullets in the scene at once, so it can’t be set per object, and I think it’ll need to run again after a scene change.

1 Like

Thank you so much for the prompt investigation and the temporary workaround!
I’ve confirmed that specifying the Z-index once in the custom action you provided causes all bullet patterns in the scene to render in the foreground.

I’ll use this solution until the official fix is released.
Thank you for your support!

1 Like