How to handle pickable property

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

Good morning,

In my 2d game, a player can click on another body to set it as player’s target. In the gui, a target crosshair sprite will be added to the position of the body.

But I don’t know how to get the body (body can be KinematicBody2D or StaticBody2D) from the click position / input_event signal.

Any ideas?