Normalizing movement when the scale changes?

Godot Version

4

Question

In my pacman recreation project for learning, I want to make the main game map its own scene so I can import it, load it, and change size based on screen size or other factors. This works, but changing the “scale” of my game scene makes it so that all of the actors speed up. Like their speed does not scale with the rest of the scene like all of the graphics and sizes do. What is the best practice for dealing with this, are there other things I should make sure to keep in mind with changing scale like this, or is adjusting scale in this method just not recommended?

Here is the scene tree within the Game scene

image

The obvious solution is to multiply speed by the parent node’s scale.x or scale.y inn the ready() function but is that perhaps misguided?

From the screenshot, it looks like you scaled the map to 0.5 for both X and Y. If this is the case, you can most likely just divide the speed of the actors by 2.

1 Like