My ball sound solution

I used the body_entered signal instead of body_shape_entered, and checked whether the body was in the “player” group.

func _on_Ball_body_entered(body):
	if body.is_in_group("player"):
		if not $KickSound.playing:
			$KickSound.play()

Very nice!

Privacy & Terms