# Arcade + Circle + fast Collision = lost velocity? (bounce=1)

**URL:** <https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054>\
**Category:** Phaser 3\
**Created:** [February 1, 2020, 11:58am UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054 "2020-02-01T11:58:26Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![paD](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/pad/32/2721_2.png) [@paD](https://phaser.discourse.group/u/paD)\
**Post date:** [February 1, 2020, 11:58am UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/1 "2020-02-01T11:58:26Z")

</div>

Hey,

i have a little problem. if i set a ball to “circle” collision. and use setBounce(1); sometimes the ball loss velocity (it slow downs dramatically).

U can reproduce it on:  
[https://labs.phaser.io/edit.html?src=src/games/breakout/breakout.js&v=3.22.0](https://labs.phaser.io/edit.html?src=src/games/breakout/breakout.js&v=3.22.0)

Just add  
this.ball.setCircle(10);  
between line 33 and 34 an try to hit two ore three bricks in a row.

Anybody an Idea?  
Thank u 🙂

paD

---

<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:** [February 1, 2020, 6:51pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/2 "2020-02-01T18:51:32Z")

</div>

This is a problem with Phaser’s circle vs. rectangle collisions, when the circle hits the corner of the rectangle. ☹

---

<div class="post-metadata">

**Author:** ![paD](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/pad/32/2721_2.png) [@paD](https://phaser.discourse.group/u/paD)\
**Post date:** [February 1, 2020, 7:40pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/3 "2020-02-01T19:40:10Z")

</div>

So, Phaser (arcade) needs an update? 😕

---

<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:** [February 1, 2020, 9:23pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/4 "2020-02-01T21:23:51Z")

</div>

I guess it’s a bug.

---

<div class="post-metadata">

**Author:** ![paD](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/pad/32/2721_2.png) [@paD](https://phaser.discourse.group/u/paD)\
**Post date:** [June 19, 2020, 2:10pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/5 "2020-06-19T14:10:23Z")

</div>

Bug is still present in 3.23

---

<div class="post-metadata">

**Author:** ![anthonydibi](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/anthonydibi/32/6839_2.png) [@anthonydibi](https://phaser.discourse.group/u/anthonydibi)\
**Post date:** [August 11, 2022, 5:12pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/6 "2022-08-11T17:12:39Z")

</div>

Bug is still present in 3.55.2 ☹

---

<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:** [August 13, 2022, 4:02pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/7 "2022-08-13T16:02:04Z")

</div>

I don’t think it would be the same problem. Can you post an example?

---

<div class="post-metadata">

**Author:** ![anthonydibi](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/anthonydibi/32/6839_2.png) [@anthonydibi](https://phaser.discourse.group/u/anthonydibi)\
**Post date:** [August 15, 2022, 7:35pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/8 "2022-08-15T19:35:18Z")

</div>

This shows it, you can see that when the player collides with the ball and the ball collides with the corner of the square hitbox the ball loses velocity. This is on the latest version (3.55.2)

---

<div class="post-metadata">

**Author:** ![anthonydibi](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/anthonydibi/32/6839_2.png) [@anthonydibi](https://phaser.discourse.group/u/anthonydibi)\
**Post date:** [August 15, 2022, 7:53pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/9 "2022-08-15T19:53:36Z")

</div>

I’ve tried changing to matter.js but that engine is even more buggy, the physics update rate is fps-dependent which makes the game unplayable on low performance machines and tilemaps are very buggy with collisions

---

<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:** [August 19, 2022, 6:22pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/10 "2022-08-19T18:22:27Z")

</div>

> [@paD](#):
>
> U can reproduce it on:  
> [https://labs.phaser.io/edit.html?src=src/games/breakout/breakout.js&v=3.22.0](https://labs.phaser.io/edit.html?src=src/games/breakout/breakout.js&v=3.22.0)
> 
> Just add  
> this.ball.setCircle(10);  
> between line 33 and 34 an try to hit two ore three bricks in a row.

I don’t think this problem appears in Phaser v3.55.2.

> [@anthonydibi](#):
>
> This shows it, you can see that when the player collides with the ball and the ball collides with the corner of the square hitbox the ball loses velocity. This is on the latest version (3.55.2)

I’ve looked at this kind of collision and it seems it should work as long as the ball has bounce (1, 1).

---

<div class="post-metadata">

**Author:** ![anthonydibi](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/anthonydibi/32/6839_2.png) [@anthonydibi](https://phaser.discourse.group/u/anthonydibi)\
**Post date:** [August 26, 2022, 7:15pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/11 "2022-08-26T19:15:05Z")

</div>

You can reproduce the issue in the breakout sandbox with version 3.55.2 though. Make the ball hit the corner of a block and it will lose velocity, even with its bounce set to 1.

---

<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:** [August 26, 2022, 8:11pm UTC](https://phaser.discourse.group/t/arcade-circle-fast-collision-lost-velocity-bounce-1/5054/12 "2022-08-26T20:11:45Z")

</div>

I don’t see it.

https://codepen.io/samme/embed/preview/JjLqgQo?default-tabs=js%2Cresult&height=300&host=https%3A%2F%2Fcodepen.io&slug-hash=JjLqgQo
