Constant checking for Area2d "body entered" signals?

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

I was wondering if there was a way to have an area constantly check if its in a body, because only checking if it enters or leaves is really buggy for some reason and counts it as out of a body while being in a body.

:bust_in_silhouette: Reply From: Thomas Karcher

You could check the result of overlaps_body(body) in your _process function:

It might lag one frame (since the overlaps are calculated only once per frame before the physics step) but should be otherwise reliable.