Area2D colliding with wrong layers

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By and3104

I’m having a problem with Area2D’s colliding with layers they are not supposed to. There are 2 Area2D nodes inside one parent scene, the first one uses layer 3, no mask, and the second uses mask 4, no layer, and they are colliding, the firts one is firing a _on_area_entered function. I’ve changed layers and masks to try any different configuration but they keep colliding! I guess the same thing happened months ago with a different scene, but it was fixed somehow…
How can I fix this, what is happening?!

:bust_in_silhouette: Reply From: PickledPenguin

I think your problem is that the first object has no mask and the second object has no layer. What that means is that they will collide with each other, regardless of the other physcis layers you have in place.
Try creating a separate physics layer for the second object and setting its collision to that layer, and make sure to have the first object mask to that layer. Then the two areas shouldn’t collide.

Hope this helps!

Nope sadly they keep colliding :((

and3104 | 2021-01-18 00:53