You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you remove a collision shape that is a child of an Area2D while that collision shape is overlapping with other bodies, the Area2D will keep reporting that those bodies are inside it.
To Reproduce
Steps to reproduce the behavior:
Add an Area2D with a collision shape or polygon
Add any type of body and make sure it overlaps with the area
During runtime remove the collision shape of the Area2D. This can be done by either area.remove_child(collider), collider.queue_free() or collider.disabled = true
Area is still overlapping with the body despite having no collision shape
Expected behavior
When a CollisionShape2D or CollisionPolygon2D is disabled or removed from an Area2D the bodies that were inside that collision shape should no longer be in the array returned by get_overlapping_bodies(). For each body that was previously inside said collision shape the area should emit the body_exited signal. This of course does not apply if the area is still overlapping with those bodies through a different collision shape.
Describe the bug
If you remove a collision shape that is a child of an Area2D while that collision shape is overlapping with other bodies, the Area2D will keep reporting that those bodies are inside it.
To Reproduce
Steps to reproduce the behavior:
area.remove_child(collider)
,collider.queue_free()
orcollider.disabled = true
Expected behavior
When a CollisionShape2D or CollisionPolygon2D is disabled or removed from an Area2D the bodies that were inside that collision shape should no longer be in the array returned by
get_overlapping_bodies()
. For each body that was previously inside said collision shape the area should emit thebody_exited
signal. This of course does not apply if the area is still overlapping with those bodies through a different collision shape.Environment:
Example project(zip)
AreaBug.zip
The text was updated successfully, but these errors were encountered: