Godot Version
Godot Engine v4.3.stable.official.77dcf97d8
Question
How can I actually update the position of TextureRect?
I’m trying to have code where when I click on a node, it moves this TextureRect node to a different position. The click process works, and everything works fine until I try to update the TextureRects’ position.
The way it works is I have a function in my TextureRect called activate(x_loc, y_loc) that gets called from a different node and has these lines of code inside the function:
set_position(Vector2(x_loc, y_loc))
show()
and this does in fact change the position and visible properties of TextureRect, but it isn’t shown on the game board. I did a little debugging and found that this same code works fine if called in the _process() function and the changes are reflected in the game window, so I’m not sure why code that does the same thing in a different function wouldn’t function as it does in _process()
Any advice?