How to update position of a Node

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

I made a Animation witch mouved an Node but the Node under the animated Node doesnt moved. How can I repair it?

:bust_in_silhouette: Reply From: Lopy

When you move a Node with a position, like Node2D, Node3D, etc, children nodes will move with it, as their own position is relative to their parent. However, if there is a gap in the chain of nodes with positions, global positioning will be used.

For instance, say you have Node2D ← Node ← Sprite1 ← Sprite2, with “A ← B” meaning “A parent of B”. Sprite2’s position is relative to Sprite1’s but Sprite1’s is absolute, meaning it will ignore Node2D’s position.