I have a bullet (area2D) with a body entered signal and the body it is colliding with is a kinematicbody2D in a group called 'Shootable'. Naturally, they both have collision shapes and the Area2D has monitoring on, but it doesn't seem to be working and I'm all out of ideas. Would appreciate any help at all :)

extends Area2D

var speed = 450

func _physics_process(delta):
	position += transform.x * speed * delta

func _on_Semi_Auto_Bullet_body_entered(body):
	if body.is_in_group("Shootable"):
		body.queue_free()
	queue_free()
	pass

How are you connecting the signal? Looking at the script, I assume the signal is connected through the editor. I would double check to make sure the signal goes to the right node and function. You can also connect the signal through code, if you want:

func _ready():
	connect("body_entered", self, "_on_Semi_Auto_Bullet_body_entered")

(Also, I fixed the code formatting in the opening post :smile: )

2 years later