0 votes

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 ?

enter image description here

enter image description here

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

in Engine by (27 points)
edited by

1 Answer

0 votes

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.

by (164 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.