method for getting a node in a certain position

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

Hi. I have an HBoxContainer and I move it (Tween) at the top of the arrow (TextureRect).
I want to get the node that the arrow points to node ?

ADD: I just made it through Area2D. I Want to find out better ways

:bust_in_silhouette: Reply From: eod

Perhaps you could loop through all 20 of your nodes and use either
rect_global_position() or rect_position()with rect_size() on them to determine if the point located at your arrow is inside the node’s rect. If it is, then that’s the node you’re looking for and you could exit the loop.