Is there a way to resize a node without resizing its children nodes?

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

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?

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?

Zylann | 2018-02-23 14:03

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!

lovegd | 2018-05-24 11:40

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.

Zylann | 2018-05-24 19:00

okay thank you

lovegd | 2018-05-25 01:28

:bust_in_silhouette: Reply From: jandrewlong

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.