I need help fixing player direction

The Problem

To handle player direction I used scale.x but in my 2D platformer, the player is rescaled, so and when it turn left, it makes the player thin. There’s also this bug where the player sprite doesn’t change direction unless it’s in a different state that’s only toggled after going in a direction then going in the opposite direction before losing all momentum.

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

Godot Version

4.2.1

The script I used for player movement (which also handles direction)

Click here to see it.

I had to reupload this topic because no one helped me last time

I couldn’t see any code that uses scale.x and can’t see the func trigger_animation(velocity, direction) but you should use flip.h to change player direction

Answered in the original topic before seeing this.

I see little point in posting the same question multiple times. Firstly, you’re not entitled to an answer. Secondly, maybe it simply means that nobody knows the answer. Thirdly, the context you provided might be not sufficient. Uploading the exact same question with the exact same context won’t fix any of that!

1 Like

sorry…