Need help with player direction & movement (different from my last 2 topics)

I’m currently making a 2D platformer and I added some player movement similar to the Super Mario Bros games and the tutorial I found uses scale.x to handle direction, but my player is rescaled and when I turn left, it shrinks my player.

There’s also this bug where my player can’t change direction (visually) unless it’s in damping mode.

If anyone can help, I’ll really be more than thankful!

Godot Version

4.2.1

Tutorial Used

Godot 4 Mario Bros Platformer Game

Pastebins

Player Movement
Player Direction

The reason I made a 3rd topic on the same issue, is that I can’t edit the other 2 since i was a new user at the time of posting this. And apparently I didn’t put enough information in any of them (my bad!)

I’ve never used 2D in Godot but I may know what your issue is, or how you can fix it.

In Godot, scaling for a 2D/3D object cannot be negative in only one axis:

This may be the reason for your issue, so you should try rotating your Sprite2D by 180deg on the Y-axis instead of scaling it non-uniformally. In theory, it should result in the same thing but it doesn’t hurt to try.

Hopefully this helps you out.

i fixed it, just had to use flip_h = true or false instead of scale.x = 1 or -1

however i have an issue where my player doesn’t change direction unless it’s damping

Okay. That’s outside the scope of this topic.
If you are experiencing another issue, make another topic (unless it already exists).