0 votes

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

Godot version 3.5.1 stable
in Engine by (17 points)

1 Answer

0 votes

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.

by (3,321 points)
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 [email protected] with your username.