# Matter Physics without Friction Still has Velocity Loss

**URL:** <https://phaser.discourse.group/t/matter-physics-without-friction-still-has-velocity-loss/2504>\
**Category:** Phaser 3\
**Created:** [May 19, 2019, 11:55pm UTC](https://phaser.discourse.group/t/matter-physics-without-friction-still-has-velocity-loss/2504 "2019-05-19T23:55:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![morellaj](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@morellaj](https://phaser.discourse.group/u/morellaj)\
**Post date:** [May 19, 2019, 11:55pm UTC](https://phaser.discourse.group/t/matter-physics-without-friction-still-has-velocity-loss/2504/1 "2019-05-19T23:55:51Z")

</div>

I’m experimenting with the Phaser 3 example Physics/Matterjs/Balls below.

[https://labs.phaser.io/edit.html?src=src\physics\matterjs\balls.js](https://labs.phaser.io/edit.html?src=src%5Cphysics%5Cmatterjs%5Cballs.js)

I’m changing the code by setting all friction to 0 and setting bounce to 1(see below).  
ball.setFriction(0.000);  
ball.setFrictionAir(0.000);  
ball.setFrictionStatic(0.000);  
ball.setBounce(1);

I would expect that the balls now continue to bounce forever since there is never any loss of velocity, just trading velocity through collisions. However, the balls do lose velocity and after around 10 seconds they all come to rest.

The best I could do was set bounce to 1.1 to continue adding extra energy into the system, but this isn’t ideal. Is there a setting I’m unaware of that I need to change to create a situation where there is no loss of velocity?

---

<div class="post-metadata">

**Author:** ![bobi](https://avatars.discourse-cdn.com/v4/letter/b/ee7513/32.png) [@bobi](https://phaser.discourse.group/u/bobi)\
**Post date:** [May 20, 2019, 11:29am UTC](https://phaser.discourse.group/t/matter-physics-without-friction-still-has-velocity-loss/2504/2 "2019-05-20T11:29:38Z")

</div>

Bodies also lose energy while converting linear velocity to angular velocity. Try setting inertia to infinite to prevent that.

You might want to look into that: [https://github.com/liabru/matter-js/issues/144](https://github.com/liabru/matter-js/issues/144)

---

<div class="post-metadata">

**Author:** ![KereneL](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/kerenel/32/7738_2.png) [@KereneL](https://phaser.discourse.group/u/KereneL)\
**Post date:** [October 16, 2023, 9:32am UTC](https://phaser.discourse.group/t/matter-physics-without-friction-still-has-velocity-loss/2504/3 "2023-10-16T09:32:30Z")

</div>

Sorry for the bump, I came across this thread looking for answers.

> Setting fixed rotation sets the Body inertia to Infinity, which stops it from being able to rotate when forces are applied to it.

[https://newdocs.phaser.io/docs/3.55.2/focus/Phaser.Physics.Matter.Components.Transform-setFixedRotation](https://newdocs.phaser.io/docs/3.55.2/focus/Phaser.Physics.Matter.Components.Transform-setFixedRotation)
