Area2D _bodyEmtered detecting collisions when it shouldnt

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

I am working with godot to create a DXBall clone as a part of my internship. After adding the powerups i am consistently having the problem of Area2D nodes that i have on my paddle to redirect the ball detecting the powerups. The area2D nodes should not be detecting the powerups since the powerups are on the 5th collision layer and the Area2D nodes are not set to monitor that layer.

:bust_in_silhouette: Reply From: betauer

Pay attention the physics engine detects collision in both directions:

A collision is dectected if:

  1. The AreaNode2D mask bit and the Powerup layer bit matches.
  2. Or the Powerup mask bit and the Area2D layer bit matches.

So, maybe you have to remove the powerup mask bit to ensure is not matching the Area2D layer.