Jump to content

Disable mass / weight to prevent body "fall through" other bodies


Recommended Posts

Hi There,

I use Arcade physics on Phaser3. And I got multiple moveable bodies which stick on top of each other.
For two bodies this works, the third does sink a bit into the second and the forth makes the whole stack collapse and fall through the bodies. (example image attached)
(edit) Note: Bodies are not falling through static sprites, the described behavior does only apply to dynamic bodies.
I would prefer a "not checking" for weight, - setting velocity Y to 0 on collision does inflict many more problems. So this won't solve the issue.

I set the OverlapBias on the Arcade physics to 20 (code below) to prevent bodies with high gravity falling through static sprites.
The Y gravity is set to 2000, decreasing this amount does not solve the issue and the gravity amount is needed.

arcade: {
  gravity: {x: 0, y: 2000},
  debug: true,
  overlapBias: 20

What I came around was thinking to set the weight or mass so that the sprites don't "sink" into each others body.
Even tho if a body is falling on onto two bodies which are on top of each other, they complete break and fall through.
Does anyone have an idea how to fix this? 


Edited by SamTheMighty
further explanation for better understanding
Link to comment
Share on other sites

  • 6 months later...

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...