Skip to content

Group vs. self collisions cause double collision callbacks #5758

@samme

Description

@samme

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions