Skip to content

Arcade Body deltas can be inconsistent during collisions #4154

@samme

Description

@samme

Version

  • Phaser Version: 3.15.1

Description

When a body collides with several bodies during a single step, it has correct deltaX() and deltaY() values only during the first collision. On any subsequent collisions during the step, deltaX() and deltaY() are 0.

In the example, this makes friction work correctly only for the first colliding body.

Example Test Code

https://codepen.io/samme/pen/oQxaVb?editors=0010

See the platform's deltaX values in console.

Additional Information

I think this is caused by calling the body's postUpdate method during separation (14d3f6b, #3777).

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