You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description:
Sorry about the title being confusing but I did not find a better way to summarize it in just a few words.
The issue I'm facing is that I have a node A which is a KinematicBody2d and has as a child an Area2D on layer 1 with, let's say, layer 2 and 4 in its mask.
The second node, B, is itself an Area2D which is on layer 3 and has layer 1 on its mask.
Both of these are monitorable and monitored.
Given this configuration I'm expecting that when A and B's areas collide, that B will receive a signal but not A given that it didn't have layer 3 on it's Area2D mask.
Currently A is receiving a body_entered signal when it collides with B's Area2D even though A's mask does not contain the layer B is in.
Is this the expected behaviour and is it up to the user to discard the event in it's callback by inspecting the body's argument collision_layer field?
Steps to reproduce:
Create a KinematicBody2D node with a Area2D as a child spanning over it.
Put the Area2D on layer 1 and no layer on it's mask. Make it both monitorable and monitoring
Attach a script to the KinematicBody2D node.
Connect the on_body_entered signal of Area2D
Create a Area2D node on layer 2 and with layer 1 on it's mask.
Make the KinematicBody2D node collide with the Area2D node
Verify that the signal callback is being called even though the KinematicBody2D's Area2D does not have layer 2 on it's mask
I'll make sure to update the issue with the minimal example tomorrow as I just don't have the time to do it today. My apologies.
The text was updated successfully, but these errors were encountered:
Seems like it. If so, it's already being addressed in this PR #42268 .
Please consider it for 4.0, if you aren't considering it yet. I'll try to check if there's a proposal for this yet.
Thanks!
Godot version:
v3.3.rc7.official
OS/device including version:
Windows 10 Home 20H2
Issue description:
Sorry about the title being confusing but I did not find a better way to summarize it in just a few words.
The issue I'm facing is that I have a node A which is a
KinematicBody2d
and has as a child anArea2D
on layer 1 with, let's say, layer 2 and 4 in its mask.The second node, B, is itself an
Area2D
which is on layer 3 and has layer 1 on its mask.Both of these are monitorable and monitored.
Given this configuration I'm expecting that when A and B's areas collide, that B will receive a signal but not A given that it didn't have layer 3 on it's
Area2D
mask.Currently A is receiving a
body_entered
signal when it collides with B'sArea2D
even though A's mask does not contain the layer B is in.Is this the expected behaviour and is it up to the user to discard the event in it's callback by inspecting the
body
's argumentcollision_layer
field?Steps to reproduce:
KinematicBody2D
node with aArea2D
as a child spanning over it.Area2D
on layer 1 and no layer on it's mask. Make it both monitorable and monitoringKinematicBody2D
node.on_body_entered
signal ofArea2D
Area2D
node on layer 2 and with layer 1 on it's mask.KinematicBody2D
node collide with theArea2D
nodeKinematicBody2D
'sArea2D
does not have layer 2 on it's maskI'll make sure to update the issue with the minimal example tomorrow as I just don't have the time to do it today. My apologies.
The text was updated successfully, but these errors were encountered: