0 votes

enter image description here

Everytime I resize this node its children gets resized as well. Is there a way to prevent the children from getting resized when the main node gets resized?

asked Feb 23, 2018 in Engine by Joe0239 (188 points)

When you touch the rectangle of the parent node, you are scaling it. Why would this not scale children?
Or put it in a different way: why do you want to scale the parent node if it has no visuals itself anyways?

suppose I scale down Path2D node to follow smaller path, the sprites that are children of pathfollow2D would also scale down, desired behaviour was to only scale path and not the objects following path
how to solve this , thanks!

It's not possible AFAIK. If you want the transform of a parent node to not affect its children, don't make them children in the first place.
However some nodes expect you put others as child of them for completely different reasons, so I understand the confusion. That could be raised on an Github issue, but sometimes you can also solve this with a bit of scripting I think.

okay thank you

1 Answer

0 votes

If you put a Node as a child of the Node2d and a parent to the Sprites, resizing the Node2d will not affect the children.

Note that if you do this, moving the Node2d also will not move the children.

answered Feb 23, 2018 by jandrewlong (318 points)
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.