Godot Version
4.4.stable.mono
Question
When setting up custom collision, the PhysicsShapeQueryParameters2D class lets you assign the collision mask, but not the layer. Why is this? Is there a way around this? According to some documents, everything is defaulted to Layer 1.
I have a bullet sprite scene set up with the Shape2d collision generated from code, which works correctly against enemies with an Area2d node. However, I have an enemy sprite scene that is set up the same as the bullet, except they won’t detect each other.
There’s practically no information on this sort of set up. I’m trying to process thousands of bullets/enemies at once, and collision detection is the biggest performance hit. Switching the bullet to the custom collision detection has massively increased performance, so I want to do the same to the enemies if I can.