I am trying to automate some node\'s movements.
I would like to move a node on top of another node but I am not able to achieve it using a generic method.
Your code looks to be correct, except that you need to account for the transformations of the nodes' parents as well, in the general case that these two nodes don't have the same parent. (I assume getBoundsInParent returns the coordinates in the parent's frame of reference, not the world.)