• Godot Help2D
  • Make scaling a parent node scale positions of children

I have all the nodes in my 2D scene inside a Position2D node so that I can scale the world quickly. This is because I am working with pixel art, and each image I have needs to be displayed at 4 times its size. However, when I adjust the scale of the Position2D node, the children are scaled as expected but there positions stay the same.

If I decide to make everything bigger this way, for example, things will also appear closer together, and my player character will appear to be moving slower because its position is defined by true pixels and not the scaled pixels of its parent Position2D node.

How could I make it so that scaling the parent node truly scales everything in it, keeping the proportions and speeds the same? Thanks

  • You might want to make Position2D a Node2D. Just right click on it and choose "Change Type" then choose "Node2D". If it has a script attached, you'll also have to change the line to extends Node2D. I think that should work.

You might want to make Position2D a Node2D. Just right click on it and choose "Change Type" then choose "Node2D". If it has a script attached, you'll also have to change the line to extends Node2D. I think that should work.

    cybereality Wait, one more thing! The positioning is fixed, but any kinematic bodies in the Node2D like my player move relative to global space and not the node, so the speed problem is still there.

    You might want to not scale the nodes at all and use a Camera2D. That way you can zoom in without messing up the physics.