From 136c6918c7d9f3ebe12c4535c438a2c67f01c110 Mon Sep 17 00:00:00 2001 From: freddie-a <57713959+freddie-a@users.noreply.github.com> Date: Sat, 29 Oct 2022 22:45:55 +0100 Subject: Add bullet collisions --- KinematicBody2D.gd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'KinematicBody2D.gd') diff --git a/KinematicBody2D.gd b/KinematicBody2D.gd index 4f2949c..96484f3 100644 --- a/KinematicBody2D.gd +++ b/KinematicBody2D.gd @@ -34,5 +34,5 @@ func _physics_process(delta): get_owner().add_child(obj) var bodies = get_overlapping_bodies() for body in bodies: - if body.get_name() != "Bullet": + if not "Bullet" in body.get_name(): emit_signal("hit", delta) -- cgit v1.2.3-70-g09d2