I've been following tutorials on how to use bit layer-mask, but none of it seems to work.. Here's my setup:
#player
layer: bit3=1
mask: bit4=1
.
#enemy (not working)
layer: bit4=1
mask: none
#enemy (not working)
layer: bit3=1, bit4=1
mask: none
#enemy (not working)
layer: bit3=1, bit4=1
mask: bit3=1
#enemy (not working)
layer: bit3=1, bit4=1
mask: bit4=1
It's supposed to print out a statement when the area collide. The statement never printed for any of these configurations.
The only setup that works is when I turn on both bit 3 and 4 of the enemy's mask:
#enemy (working)
layer: none
mask: bit3=1, bit4=1 #BOTH bits must be high. why?
and yes, both bit 3 AND 4 must be active for the collision to be detected. if either bits is pulled down to 0 then the collision will not be detected and no print statement will occur.
Did Godot4 change how layer and bitmasking work or is this a bug? Where do I go to see known bugs? I'd like to report it if it's actually a bug.
Here's the code for the enemy if it helps btw:
func _on_hurtbox_area_entered(area):
for body in $hurtbox.get_overlapping_bodies():
print("detected")