I am working on a project in which I am using 3 layers/masks:
- player: layer 1, mask 2,3
- object (Area2D): layer 2, mask 1
- hazard (StaticBody2D): layer 3, mask 1
And my understanding with that setting is that objects and hazards would not interact with each other, however on a hazard scene I have set up the Node: 'body_entered' in which I'm just printing the class of the body (body.get_class) and to my surprise it prints an object (layer 2) class.
So now I'm confused, and the documentation says: "This describes what layers the body will scan for collisions. If an object isn’t in one of the mask layers, the body will ignore it. By default, all bodies scan layer 1." Which would suggest that my original understanding is right, and yet it is not working like that when I try it out?