Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Group vs. self collisions cause double collision callbacks #5758

Closed
samme opened this issue Jun 27, 2021 · 1 comment · Fixed by #5763
Closed

Group vs. self collisions cause double collision callbacks #5758

samme opened this issue Jun 27, 2021 · 1 comment · Fixed by #5763

Comments

@samme
Copy link
Contributor

samme commented Jun 27, 2021

Version

  • Phaser Version: 3.55.2 and earlier

Description

Create an Arcade Physics group with two overlapping members. Add an overlap collider with a collision callback. The callback is called twice per collider update or world step.

The same will happen if you use a collide collider with custom separation (no separation).

It will not happen with an ordinary group or array or when the physics world useTree is disabled.

Example Test Code

https://codepen.io/samme/pen/GRmKzPE

See failed assertion in console.

Additional Information

I think group vs. self checks mustn't search the body tree.

@photonstorm
Copy link
Collaborator

Thanks for opening this issue, and for submitting a PR to fix it. We have merged your PR into the master branch and attributed the work to you in the Change Log. If you need to tweak the code for whatever reason please submit a new PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants