# Slow motion not working for physics

**URL:** <https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997>\
**Category:** Phaser 3\
**Created:** [April 20, 2020, 8:36am UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997 "2020-04-20T08:36:05Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coatl](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/coatl/32/2176_2.png) [@Coatl](https://phaser.discourse.group/u/Coatl)\
**Post date:** [April 20, 2020, 8:36am UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997/1 "2020-04-20T08:36:05Z")

</div>

Hello,  
I have a hard time slowing time in a matter physics scene. `this.matter.world.timeScale = 0.5` doesn’t do anything at all, the objects are moving with the unchanged velocity and colliding like in a normal timeScale. Have you any ideas what might be the problem?

---

<div class="post-metadata">

**Author:** ![UltimateProGrammer](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/ultimateprogrammer/32/3069_2.png) [@UltimateProGrammer](https://phaser.discourse.group/u/UltimateProGrammer)\
**Post date:** [April 20, 2020, 12:48pm UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997/2 "2020-04-20T12:48:57Z")

</div>

I’ve had this problem too. [It’s actually not a property of matter.world](https://photonstorm.github.io/phaser3-docs/Phaser.Physics.Matter.World.html). The only way I could do it was put it in the gameObject’s [Matter Body Config](https://photonstorm.github.io/phaser3-docs/Phaser.Types.Physics.Matter.html#.MatterBodyConfig__anchor). That’s definitely not the proper solution, so I hope someone else knows more.

---

<div class="post-metadata">

**Author:** ![jjcapellan](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/jjcapellan/32/542_2.png) [@jjcapellan](https://phaser.discourse.group/u/jjcapellan)\
**Post date:** [April 20, 2020, 1:17pm UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997/3 "2020-04-20T13:17:45Z")

</div>

Hi @Coatl,  
This is the property you need:

```javascript
this.matter.world.engine.timing.timeScale 

```

Regards.

---

<div class="post-metadata">

**Author:** ![Coatl](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/coatl/32/2176_2.png) [@Coatl](https://phaser.discourse.group/u/Coatl)\
**Post date:** [April 20, 2020, 2:20pm UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997/4 "2020-04-20T14:20:05Z")

</div>

This really seems to be what I need, but it doesn’t work well either. It doesn’t really do proper slow motion effect, because the friction stops the object much sooner than needs to be. (I set `this.matter.world.engine.timing.timeScale = 4`) And if I set friction to (0,0,0), it actually runs faster and ignores collisions. (The reason for ignoring collisions seems to be ignoring some physics updates.)

---

<div class="post-metadata">

**Author:** ![jjcapellan](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/jjcapellan/32/542_2.png) [@jjcapellan](https://phaser.discourse.group/u/jjcapellan)\
**Post date:** [April 20, 2020, 2:37pm UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997/5 "2020-04-20T14:37:18Z")

</div>

For slow motion effect `this.matter.world.engine.timing.timeScale` must be between 0 and 1.

---

<div class="post-metadata">

**Author:** ![Coatl](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/coatl/32/2176_2.png) [@Coatl](https://phaser.discourse.group/u/Coatl)\
**Post date:** [April 20, 2020, 2:50pm UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997/6 "2020-04-20T14:50:07Z")

</div>

Timescale = 0.25 doesn’t slow anything, and friction is weaker.

---

<div class="post-metadata">

**Author:** ![jjcapellan](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/jjcapellan/32/542_2.png) [@jjcapellan](https://phaser.discourse.group/u/jjcapellan)\
**Post date:** [April 20, 2020, 3:19pm UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997/7 "2020-04-20T15:19:33Z")

</div>

I have tested it [here](http://labs.phaser.io/edit.html?src=src%5Cphysics%5Cmatterjs%5Cadd%20body%20to%20text.js) and works as expected.  
You can try to reproduce your specific case using the Phaser examples:  
[http://labs.phaser.io/index.html?dir=physics/matterjs/&q=](http://labs.phaser.io/index.html?dir=physics/matterjs/&q=)

---

<div class="post-metadata">

**Author:** ![Coatl](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/coatl/32/2176_2.png) [@Coatl](https://phaser.discourse.group/u/Coatl)\
**Post date:** [April 21, 2020, 9:48am UTC](https://phaser.discourse.group/t/slow-motion-not-working-for-physics/5997/9 "2020-04-21T09:48:39Z")

</div>

I can’t reproduce it there and have no idea why the objects behave so strange in my case. I am giving up for now, will try another approach. Thank you for showing me.
