Empty space between two bodies

Hi,

Until now, I used the 2.0.1 version of Box2D and it was fine. Now,I use the last version (2.1.2) and I have a little problem.

In a simulation, there is an empty space between all my bodies.

Like that :

Image

For my rendering, I use SFML. I try the same code with Box2D v2.0.1 and I don't have this problem.
I don't know if it's a known bug or if there is a simple tips to avoid that, but I didn't find any information about that.

Hope that you could help me ! 😀

(Sorry for my bad english, I'm french 😕 )
From the manual:

Quote:
Polygons inherit a radius from b2Shape. The radius creates a skin around the polygon. The skin is used in stacking scenarios to keep polygons slightly separated. This allows continuous collision to work against the core polygon.


Your graphical representation is not restricted by Box2D. You can draw larger boxes if you like.
Thanks a lot for this information ! I didn't notice that in the manual :/

However, I think it's not realy convenient to modify the graphical representation. I find the empty space is in fact a 0.01 Box2D units additional to the total size of the body. So, I subtract it when I create a body and it works perfect.

A "dynamicBox.SetAsBox(0.5f, 0.5f);" become "dynamicBox.SetAsBox(0.495f, 0.495f);"

Anyway, thanks for your help =)

Original thread: https://box2d.org/forum/viewtopic.php?t=5903