0 votes

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.getoverlappingarea()[0].name = NodeB
NodeB..getoverlappingarea()[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?

in Engine by (42 points)

1 Answer

+1 vote

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).

by (7,898 points)

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

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.