Fixing character sliding when changing direction (Platformer)

How do I…

I’m trying to get the movement smoother when the character pivots. When holding the run button the speed and direction change are quite seamless and the character doesn’t slide much. However, when I hold only the left or right buttons and try to change to its opposite direction, the character keeps sliding and takes a long time to lower its speed then speed back up in the new direction, like the GIF below:

What is the expected result

I tried:
Upon pressing the opposite direction key:
Setting deceleration at a high number like 5000
Changing max speed to 0
Stop forces

None of which worked :frowning:

What is the actual result

Related screenshots

Momentum

Project files (optional)

Can you screen snip all the events regarding the character movement?

And what behaviours are attached to the player object?

Oh right, the post didn’t allow me to put the events for the movement, here it is:

Behaviours:
Fire Bullet
PlatformMultiTouchMapper
PlatformerObject
SmoothCamera
TopDownMovement

Is there supposed to be deceleration? In my cases, I always set that in the actual behaviors of the character, not the event sheet. I would also assume it has to do with the inverted key press towards the bottom of your sheet.

I also noticed your behaviors. Is there a reason for top-down movement when you are doing a platformer? There’s specifically a platformer character behavior, and the movement keys are already programmed. But you can still do custom controls, too.

I think I can help you, but I just want to figure out what exactly you want to do.

Either have top-down movement, or platformerObject, but not both. One will be conflicting with the other.

Don’t change the acceleration, decelertation or max speed in events unless there is a need for it (like when a player goes through a sticky material or is skating on ice).

Yea removing the top-down movement did the trick!

Thank you :slight_smile: