|Topic was automatically imported from the old Question2Answer platform.
I’m new to this and I have looked everywhere for an answer but can’t find it.
I need to get a TextureButton position so I can set another node position, but I just can’t seem to find a way to do it.
I would appreciate any help.
There are two types of position, the “relative” one and the global one.
The first type is relative to the parent of the node and can be accessed with
Node.position. It returns a
The other one, the global one, gives the global position, and can be accessed with
Node.global_position. It also returns a
Where did you search?
These informations are avaliable in the docs, which you can see online or in the editor.
If you want the 3D position, search the docs, I’m not used to 3D so I can’t help you with that. I may be wrong but I think that, in 3D, you need to use
Node.get_position() which returns a
If this answer solved your problem, please set it as the best answer.
Good luck with your project