# Matter.js / Inertia coming to a stop

**URL:** <https://phaser.discourse.group/t/matter-js-inertia-coming-to-a-stop/14376>\
**Category:** Phaser 3\
**Created:** [May 31, 2024, 1:48pm UTC](https://phaser.discourse.group/t/matter-js-inertia-coming-to-a-stop/14376 "2024-05-31T13:48:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![everlite1knight](https://avatars.discourse-cdn.com/v4/letter/e/c67d28/32.png) [@everlite1knight](https://phaser.discourse.group/u/everlite1knight)\
**Post date:** [May 31, 2024, 1:48pm UTC](https://phaser.discourse.group/t/matter-js-inertia-coming-to-a-stop/14376/1 "2024-05-31T13:48:18Z")

</div>

Hi!

I’m trying a bunch of ways to get an inertia effect when a character stops moving; ie the character moves, then keys are released and the character loses energy and slows down to a stop. Sadly no matter what i do i cant seem to accomplish this. Any suggestions?

class Player {  
constructor(scene, x, y) {  
this.scene = scene;  
this.sprite = scene.matter.add.sprite(x, y, ‘cube’).setBounce(0.2).setFixedRotation();  
this.sprite.body.inertia = Infinity;  
this.sprite.setFrictionAir(0.01);  
this.sprite.setFriction(100.2);  
this.canJump = true;  
this.isOnGround = false;

I know the 100.2 value very high, but i tried much lower values with no success.

Thank you!
