Collision Layer Confusion
Scenario: Player bullets do not hit enemies. Enemy projectiles do not hurt the player. The code handles body_entered and area_entered correctly, but those signals never fire.
This is the most common "why doesn't this collide?" problem in Godot. The physics layer/mask system is powerful but easy to misconfigure.
Setup
Player:CharacterBody3D, layer=1Enemy:CharacterBody3D, layer=2PlayerBullet:Area3D(the bullet hitbox), meant to detect enemiesEnemyProjectile:Area3D, meant to detect the player
Step 1: Observe the current layer configuration
Step 2: Confirm with relationship query
Step 3: Fix the layer configuration
Step 4: Set meaningful layer names
Step 5: Verify
The collision layer checklist
Use this as a mental model for any collision layer problem:
For two bodies to interact:
A.collision_mask must include any bit from B.collision_layer
OR
B.collision_mask must include any bit from A.collision_layer
(for Area3D + PhysicsBody: both conditions apply)
(for PhysicsBody + PhysicsBody: either direction triggers)
For Area3D to detect a PhysicsBody:
Area3D.monitoring must be true
PhysicsBody.collision_layer AND Area3D.collision_mask ≠ 0
For Area3D to detect another Area3D:
Both must have monitoring=true AND monitorable=true
Areas' layer/mask must overlap in both directionsKey takeaways
scene_treewithshow_propertiesis the fastest audit tool. One call showed all four nodes' layer/mask configuration simultaneously — no need for four separate inspects.- Layer 4 / mask 4 self-loop is a common mistake. Setting both to the same value means the object only detects itself — useless and hard to spot without seeing the actual bitmask.
- Set layer names early. Named layers prevent future misconfiguration. "PlayerBullets" is unmistakable; "4" is not.
batchfor multi-node layer fixes. All six property changes applied in one round-trip.