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

Arcade Body deltas can be inconsistent during collisions #4154

Closed
samme opened this issue Nov 9, 2018 · 2 comments
Closed

Arcade Body deltas can be inconsistent during collisions #4154

samme opened this issue Nov 9, 2018 · 2 comments
Labels
😖 Difficulty: Complex A time consuming task

Comments

@samme
Copy link
Contributor

samme commented Nov 9, 2018

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).

@samme
Copy link
Contributor Author

samme commented Nov 12, 2018

Here's another example. Box collides with 5 balls simultaneously but only 2 balls are moved:

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

@photonstorm
Copy link
Collaborator

Agreed, it's the reason the mass collide demo doesn't work properly anymore either. Will look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
😖 Difficulty: Complex A time consuming task
Projects
None yet
Development

No branches or pull requests

2 participants