# Smooth setVelocity with Multiple Refresh Rates

**URL:** <https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410>\
**Category:** Phaser 3\
**Created:** [October 10, 2022, 3:22pm UTC](https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410 "2022-10-10T15:22:26Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![gccalvin](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/gccalvin/32/6996_2.png) [@gccalvin](https://phaser.discourse.group/u/gccalvin)\
**Post date:** [October 10, 2022, 3:22pm UTC](https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410/1 "2022-10-10T15:22:26Z")

</div>

Hello, I’m sure this question has been covered a thousand times, but I’m having difficulty finding a clear answer.

Using the provided [making your first Phaser 3 game](https://phaser.io/tutorials/making-your-first-phaser-3-game/part1) tutorial, the setVelocity stutters depending on the refresh rate of the monitor.

From what I’ve gathered, this is because Update() isn’t called at a fixed rate? So the effect will differ depending on the frame rate.

I also tried multiplying my setVelocity with delta and the problem persists.

What do I need to add to make the physics smooth?

Any help is appreciated.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [October 10, 2022, 3:36pm UTC](https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410/2 "2022-10-10T15:36:20Z")

</div>

By default, Arcade Physics steps by a fixed delta. Never multiply velocity by a delta.

You may see a low display frame rate (stuttering?) but you shouldn’t see physics time distortion (slowdown) — with some brief exceptions.

Are you moving a browser window between two monitors?

---

<div class="post-metadata">

**Author:** ![gccalvin](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/gccalvin/32/6996_2.png) [@gccalvin](https://phaser.discourse.group/u/gccalvin)\
**Post date:** [October 10, 2022, 4:02pm UTC](https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410/3 "2022-10-10T16:02:01Z")

</div>

Hello,

After I read your message it occurred to me that I should try it on the primary monitor (165hz), and everything is now smooth. I’m guessing the Arcade Physics sets its fixed delta to the primary monitor’s refresh rate? So if I set all the monitors to the same refresh rate (60hz) then everything is smooth.

It might also be something with Windows, where on the desktop chrome trys to force the primary refresh rate (165hz) even if the window is on a 60hz monitor.

Nontheless, it is no longer an issue, thank you for your help.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [October 10, 2022, 4:57pm UTC](https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410/4 "2022-10-10T16:57:54Z")

</div>

The Arcade Physics step rate is 60hz by default, no matter what, but you can change that (`fps`) in [its config](https://newdocs.phaser.io/docs/3.55.2/Phaser.Types.Physics.Arcade.ArcadeWorldConfig "ArcadeWorldConfig").

---

<div class="post-metadata">

**Author:** ![gccalvin](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/gccalvin/32/6996_2.png) [@gccalvin](https://phaser.discourse.group/u/gccalvin)\
**Post date:** [October 10, 2022, 5:16pm UTC](https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410/5 "2022-10-10T17:16:30Z")

</div>

In that case then the game should stay around 60 frames per second? In chrome the fps goes to the refresh rate of the primary monitor (165hz). Seems weird that moving the tab to the 165hz monitor would eliminate the stuttering.

---

<div class="post-metadata">

**Author:** ![samme](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/samme/32/5275_2.png) [@samme](https://phaser.discourse.group/u/samme)\
**Post date:** [October 10, 2022, 10:02pm UTC](https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410/6 "2022-10-10T22:02:21Z")

</div>

No, the Arcade Physics step rate and the game step rate are independent (unless you set `fixedStep: false`). The game step rate comes from [requestAnimationFrame](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) and generally follows the display refresh rate.

Not sure what’s going on but you can check [https://cdpn.io/pen/debug/KbdXad](https://cdpn.io/pen/debug/KbdXad) on both your displays.

---

<div class="post-metadata">

**Author:** ![gccalvin](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/gccalvin/32/6996_2.png) [@gccalvin](https://phaser.discourse.group/u/gccalvin)\
**Post date:** [October 10, 2022, 10:21pm UTC](https://phaser.discourse.group/t/smooth-setvelocity-with-multiple-refresh-rates/12410/7 "2022-10-10T22:21:36Z")

</div>

Quite odd, both monitors show the same stats:  
 ![image](https://global.discourse-cdn.com/free1/uploads/phaser1/original/2X/d/ddc9d3d6fe5154c7732fc7ce0cd244a4fa453d12.png)
