Topic was automatically imported from the old Question2Answer platform.
Asked By
slippe
Hello everyone, I ran into the following problem when creating my game:
I made a flying arrow from a trap, but when it flies out, it does not go through the enemy, but disappears, I would like it to fly through the enemy and kill the main character
func _on_arrow_body_entered(body):
if "Player" in body.name:
body.die()
queue_free()
Don’t need to use code, just try to set Collision Layer and Collision Mask, let the arrow can detect Player and ignore enemies.
If you don’t know what is Collision Layer, take a look at this video.