0 votes

See title; I'm designing a game around swordplay and the player character's sword is set as an Area2D under them. The sword can be swung in different ways, each one with a different hurtbox shape, and these shapes are CollisionPolygons set as children of the Area2D, and are enabled and disabled based on which sword swinging animation the player uses.

Some of these animations can be extended, which gives the sword a second hurtbox that is only effective at the end of the animation. However, enabling the extended hurtbox immediately after the initial hurtbox is disabled will cause it to set off the area_entered signal on other areas, even if both the initial and extended hitboxes are both intersecting the other areas and they're changed within a single function call.

Is it possible to have area_entered only fire when an Area2d enters it, and not if the Area2d inside it changes its collision shape?

I have figured out a workaround, but I'd like to ask if this is possible to avoid overcomplication.

Godot version 3.2.3.stable
in Engine by (31 points)

Please log in or register to answer this question.

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.