Area2D Collisions

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By StephenMichaelis


I have 2 Area2D’s that collide, say a large square and small square, once they touch, this invokes the area_entered signal as soon as the small square is completely inside the large square the area_exited signal is invoked.

I am wondering is this is expected behavior or should area_exited invoke only when they are no longer overlapping?


Maybe could you show us a detailed log with what signal is emitted and received from where, what area’s or body’s are involved ? Have you check the shapes of each area to be sure they are where they shoulb be ?

Midonk | 2021-12-22 10:07

:bust_in_silhouette: Reply From: Mr. Gamezz

This is a weird case. It shouldn’t invoke area exited because the collision shapes are still colliding. I have two ideas on what to do. Check if the signals are actually area_entered and area_exited. If they are set to area_entered and body_exited, It wont react the same. Make sure that the signals are area_entered and area_exited. If that doesn’t work, Try resetting the collision shapes. I’m new to Godot and this hasn’t happened to me before but I believe it’s the functions. If not, Which Area2D is invoking area_exited?