Character sliding after jump

So I have this really simple game where my character jumps left and right to evade incoming objects. Only issue is when my character jumps left or right and he lands on the ground, he’s sliding like he’s on ice. How do I make him not slide when he lands?

if (jumping.up.isDown && player.body.touching.down)
				{
				    player.setVelocityY(-675);
				    player.setVelocityX(200);
				   
				}

Hey @phuthinhon, i think you can set the velocityX to 0 would do the trick ?

player.setVelocityX(0);

Where your player is landed ?

@hcakar hi, thanks for the reply, I tried adding the code you gave in another if statement but now when I jump it’s only vertical

Maybe setDrag() can help you.
https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Arcade.Sprite.html#setDrag__anchor

I see, yea now actually I’m getting it why :smiley:
Okey maybe try @yannick’s answer would help :slight_smile: