Is it possible for Area2D collission detection without being detected by collider Area2D?

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

I have done the following test with the help of someone from r/Godot
NODE = Area2D > CollisionShape2D > Sprite
NODE instance A = Collision Layer 0, Collision Mask 0,1
NODE instance B = Collision Layer 7, Collision Mask 0,1

NodeA.get_overlapping_area()[0].name = NodeB
NodeB…get_overlapping_area()[0].name = NodeA

I was told once NodeB detected NodeA, NodeA in return will be forced to detect NodeB. I was looking for a setup where NodeB can detect NodeA but not the other way around, can this be possible?

:bust_in_silhouette: Reply From: eons

No, at least up to 3.0, collisions/detections are managed in pairs so both will get the notification, it may or may not change in the future.

To solve that you can just put conditions on where the signal must be ignored (like double checking the layer-mask).

Thanks for the confirmation. I will proceed with handling them with some coded conditions.

Allan | 2018-11-16 11:15