How to get the position of an object

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

I have an area2D which sends a signal when another object on the scene enters it. How do I get the position of the entered object?

:bust_in_silhouette: Reply From: DDoop

The body_entered signal should automatically pass the entering object to the signal recipient as a local variable body; ie you should be able to use body.position inside the _on_area_body_enter function block wherever the signal is received.