[SOLVED] Changing players scale causes a super jump when hugging a wall

Hi. I already made a post about this phenomenon but it’s causes were misdiagnosed. Unlike I originally thought, the root of the problem doesn’t lie in Tweens.

I have a platformer game. The player can become “small” at any point by pressing space.

This is the scenario. First the player becomes small and goes hug a wall.

Then the player jumps:

Now, during the jump, player presses space and becomes big again. This is when the player (depending on the timing) either gets an ability to double jump in the air (unintentional) or just gets launched upwards automatically.


__

My levels are made out of tileset objects.

My theory is that GDevelop puts the big player inside the wall for a very short amount of time before pushing them out, and it causes these problems.

The problem disappears if I only scale players height, not width. Unfortunately, I need to scale both.

Thank you

Have you tried, as soon as the player is scaled up, to move them away from the wall?

Hi.

In what way?

The direction I should move the player depends on whether the wall is on left or right side.

Also, the wall can be both in front of the player and behind them (as long as they are really close to the wall.

There’s a “separate [object] from [object]” action. GDevelop automatically moves the first object in the shortest direction—no need to specify one.

1 Like

That actually fixed the whole thing. Incredible

Thank you