hi this is my first question so pardon me for any mistakes
i'm trying to make an asteroids clone following this tutorial
i've setup two scenes "laser" and "asteroid" each with a script attached to their root nodes
here are the important bits
laser.gd
func _on_laser_body_shape_entered(body_id, body, body_shape, area_shape):
if (body.is_in_group("asteroids")):
print("asteroid hit")
body.call_deferred("explode")
get_parent().remove_child(self)
queue_free()
asteroid.gd
var is_exploded := false
func explode():
print("called exploded")
if is_exploded:
return
is_exploded = true
get_parent().remove_child(self)
queue_free()
i only see asteroid hit in the console, can anybody explain me how to use the call_deferred function, or help me fix the code
edit: here are the project files