Area2D not detecting some bodies

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

Why doesn’t my player get detected by the enemy’s Area2D body entered function? I’ve tried making the Area2D collision larger, but at no points does it it detect the players body

Code:

func _on_Area2D_body_entered(body):
     print(body.name)

Output (bouncer is enemy name)
Bouncer is the enemy’s name (another will spawn), KinematicBody2D is the icon’s name
player
enemy

:bust_in_silhouette: Reply From: Gluon

It could be that it isnt set up to detect collisions on the layer the player is set up on? maybe worth checking the layers the player is on and the layers the collision layer the enemy is set to look for are the same.