A question about layers

Godot Version

4.2.1

Question

Hello, I am learning Godot and I was doing this tutorial https://www.youtube.com/watch?v=JZs9PZNfGqs&list=PLaGRTLvEbVzyUMwjUPgrreyRE3AY8jhOK&index=7

it uses an older version of Godot and I am using 4.2. so far no problem as the video comments address some of the differences. but in this case I noticed that when assigning layers the moment I change them away from the 1st layer. the player and the enemies simply stop interacting with one another. even the body entered signal stops recognizing the player. and the bullets do not connect to the enemy.

what may be causing this behavior. and where can I find an answer.

the layer is the collision
the layer mask is what detects the layer

if you want the enemy to detect the player
the enemy mask should be the same as the player layer

is not working,
right now the enemy has an Area3D with a cilinder CollisionShape3D an a signal

func _on_area_3d_body_entered(body):
	print ("body entered attack area", body)

right now the layers are set as follow
1 World
2 Player
3 Enemies

when they are all in the world layer they work. but If i change the enemy scene to the enemy layer and the player scene to the player layer. it stops working even if i set both of them to mask both player and enemy masks.

I got it working, The problem was that The Area3D node collision layers are independent from the root node (character, Bullet, etc…) so I had to set those individually. to define how the Area3D interacts with the layers. and also set the layer for the nodes that represent the characters.