0 votes

If I start with a Sprite, and then instance & add_child() another Sprite, it seems like the following is true:

If you create a tween, and move the parent by property "position" the child will automatically stay "locked" and move with the parent around on screen.

However, if you create a tween, and move the parent by property "offset" the child will stay in it's original position while the parent moves around on screen.

In my case, the child sprite is a highlighter around the parent sprite representing that the parent sprite is "active". My current solution is to run 2 tweens at the same time, one that moves the parent sprite's offset and one that moves the child sprite's offset in the same manner.

My question is: When you move the offset of a parent node, is it true that the child node does not automatically have it's offset changed to match that of the parents?

asked Nov 4, 2019 in Engine by eod (145 points)

1 Answer

0 votes
Best answer

No, the child is relative to the transform of the parent. No other settings such as the offset will affect the child nodes.

answered Nov 6, 2019 by Magso (2,851 points)
selected Nov 27, 2019 by eod
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.