0 votes

So, I have 4 layers: World -> Player -> PlayerHurtBox -> EnemyHurtBox.
I have a scene of grass, that player can damage. It has a Sprite and HurtBox (Area2D) where the layer is EnemyHurtBox. Only one player's hitbox has mask EnemyHurtBox but my problem is that two or more pieces of grass scene destroy each other when one cover another. For this problem I did layers but it didn't help.

in Engine by (16 points)
recategorized by

Collisions cover each other
only layer EnemyHurtBox

It has a signal "areaentered()" that does "queuefree()"

Ask me some images for more information if you need

1 Answer

0 votes

It must work without it...
but the possible solution is to add a group in Grass.tscn, for example, "grass" and write the code:
if area.get_parent().is_in_group("grass"): return

by (16 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.