Godot Version
v4.1.1
Question
I can’t detect area collision 2D from two CharacterBody2D’s, this is the code which is in the first CharacterBody:
func _on_area_2d_area_entered(area: Area2D) → void:
get_tree().quit()
(the get_tree().quit() is a placeholder to know if it works)
I am trying to make it so that only one CollisionShape2D is a child to an Area2D while other CollisionShape2D’s are not.
And is it a problem that in the second CharacterBody2D without the script attached to it isn’t a child node to a Area2D but instead is just a CollisionShape2D?
I have both the Area2D in the first character and the CollisionShape2D in the second character in groups.
I also have the CharacterBody2D’s in separate collision layers while the area 2D is in both collision layers, this is because I didn’t want them to collide but instead just phase through each other, while still detecting is that Area2D has collided with the other CollisionShape2D.