Topic was automatically imported from the old Question2Answer platform.
Asked By
Shortanel
Hi I’m working at a space shooter and I have a bug.
func _on_Player_area_entered(area):
if area.is_in_group("Enemies"):
print("dead!")
queue_free()
This should destroy the player is it’s collieded with an enemy but the problem is that it dosen’t do that all the time. I have instances when it needs five times to collide with an enemy to die. Any solution?
P.S. I put the print dead for seeing if it ignore the enemies and it do that.sorry for bad english :))
What happens to the enemy when they collide? Is he destroyed as well? If yes, it could happen that one signal is processed faster than the other and the enemy is already destroyed by the time the player checks for collisions.
Thomas Karcher | 2020-11-27 08:59
Yes the enemies gets destroyed.
it could happen that one signal is processed faster than the other and the enemy is already destroyed by the time the player checks for collisions.