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?

in Engine by (194 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.

by (344 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 Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.