# Motion blur

**URL:** <https://phaser.discourse.group/t/motion-blur/15235>\
**Category:** Phaser 3\
**Created:** [March 16, 2025, 11:08pm UTC](https://phaser.discourse.group/t/motion-blur/15235 "2025-03-16T23:08:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![juji](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@juji](https://phaser.discourse.group/u/juji)\
**Post date:** [March 16, 2025, 11:08pm UTC](https://phaser.discourse.group/t/motion-blur/15235/1 "2025-03-16T23:08:55Z")

</div>

Hello, i was wondering if motion blur based on velocity is possible

---

<div class="post-metadata">

**Author:** ![ohio](https://avatars.discourse-cdn.com/v4/letter/o/54ee81/32.png) [@ohio](https://phaser.discourse.group/u/ohio)\
**Post date:** [March 18, 2025, 4:18pm UTC](https://phaser.discourse.group/t/motion-blur/15235/2 "2025-03-18T16:18:50Z")

</div>

Im not sure if you could do that with a built in function with phaser, but you could change the image of the player based on its motion like so…

```javascript
if (Math.abs(sprite.body.velocity.x) > number || Math.abs(sprite.body.velocity.y) > number)
{
    sprite.anims.play('blurry moving animation');
}
else
{
    sprite.anims.play('normal animation');
}

```

all math.abs does is get the absolute value of a number, so it would make -100 turn into 100 but math.abs(100) = 100.

---

<div class="post-metadata">

**Author:** ![juji](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@juji](https://phaser.discourse.group/u/juji)\
**Post date:** [March 19, 2025, 12:59pm UTC](https://phaser.discourse.group/t/motion-blur/15235/3 "2025-03-19T12:59:30Z")

</div>

Yes I thought something like texture swapping would be the most correct approach. Because I tried controlling the strength of the postFX.addBlur during the animation but that caused the game to be laggy

---

<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:** [March 19, 2025, 6:39pm UTC](https://phaser.discourse.group/t/motion-blur/15235/4 "2025-03-19T18:39:22Z")

</div>

> **[Motion blur Phaser Sandbox Entry](https://phaser.io/sandbox/3BAs8r8C)**
>
> Move with cursor keys

---

<div class="post-metadata">

**Author:** ![juji](https://avatars.discourse-cdn.com/v4/letter/j/b4bc9f/32.png) [@juji](https://phaser.discourse.group/u/juji)\
**Post date:** [March 20, 2025, 3:08pm UTC](https://phaser.discourse.group/t/motion-blur/15235/5 "2025-03-20T15:08:40Z")

</div>

That’s good brother thank you
