EdgeBox passes through another edge box. Bug?

I have looked at various sources for the answer to my problem however nothing available seems to help.
This question here seems to have the same problem.
I am having difficulty understanding what the difference is between a createBox and createEdgeBox the documentation simply states that createEdgeBox simply creates a hollow body I am not sure what that means and how does it make it different from createBox. Maybu understanding that concept might help me understand why I have the following problem.

I currently have a platform on which objects stand on. This physics object is a static object (the setDynamic method is called with true to make it static).This physics object is created with createEdgeBox method. Now here is the problem if I create an object with createBox and attach it to a sprite , the object collides with the ground and ultimately stands on top of the first object.However when I create another physics object this time with createEdgeBox it does not stand on top of the platform and instead passes through it.Here is my observation

1-object created with createBox and createEdgeBox collide with each other.

2-object created with createEdgeBox (dynamic) and createEdgeBox (static) do not collide with each other and instead the dynamic object passes through the static one. The dynamic object is moving with a very very slow velocity.

Also if it helps I am not setting a setCategoryBitmask for any of these objects. I also noted that if I replace the dynamic EdgeBox with a simple Box create with createBox then it does not pass through the static ground.
Any suggestions on this issue would be very appreciated.

You should only be using edge boxes for the “edges” of your physics world (I think). The idea is that a Box has mass all along the object while the edge box only has mass on the edges (so two edge boxes inside eachother are not colliding whereas a box inside another box would be constantly colliding with it). That’s what it means to be a hollow body (the mass is only on the edges.) I think most of your use cases should be createBox instead of createEdgeBox except for maybe the ground which could be an edgeBox.

Basically, I can think of very few cases where two edgeBoxes should collide. For the most part, two boxes might collide or a box and an edgeBox might collide but edgeBoxes are supposed to be static objects by nature.

1 Like