0 votes


is there a way to autoscale the character when he is near of the foreground in a 2D game?

For example, imagine the next scene in a 2D point and click game:

enter image description here

Character should appear bigger in the foreground than when he walks by the end of the scene. Can I control this without use code? Can I select the zones when the character should escalate progressively.

Thanks and kind regards.

asked Sep 16, 2019 in Engine by JuanDaniel (15 points)
recategorized Sep 16, 2019 by JuanDaniel

1 Answer

+2 votes
Best answer

Here is a very rough idea of how to do it. I'm sure there are better ways, but you could maybe try starting with this: https://github.com/e-e/godot-y-scale

The main idea is that you set points where you know what the scale should be, and it will try to figure out the inbetweens based on the distance between two known points, using the players y-position.

answered Sep 17, 2019 by Eric Ellingson (1,579 points)
selected Sep 22, 2019 by JuanDaniel

Thanks Eric! I will try it and I will comment the results. :)

Thanks Eric! It works very well. I tried with polygons to select the area where the character should scale, but your approach is better.

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.