Is it a bug in Physics simulation plugin?

why there is space between blocks, play the demo at the following link
default settings of physics automation and the image of red block is following

click on the top block to see what happens…!

Hi and yes, it seems that there is some inaccuracy with the physic body, but doesn’t look like a problem from GD :slight_smile:
I would suggest you to setup your own rectangle shape with the Custom Polygon option, but since you are using HTML5 the option isn’t available yet :frowning:

Sorry for double-posting, just to ensure you read the workaround :slight_smile:
If you really need this, you have to edit a file (don’t worry, it’s only one file, specifically two lines):

  • Go to “GD_Folder/JsPlatform/Runtime/Extensions/PhysicsAutomatism/”
  • Open “physicsruntimeautomatism.js”
  • Modify the line 202 from ((this.owner.getWidth() > 0 ? this.owner.getWidth() : 1)* to ((this.owner.getWidth() > 0 ? (this.owner.getWidth() - 2) : 1)*
  • Modify the line 204 from ((this.owner.getHeight() > 0 ? this.owner.getHeight() : 1)* to ((this.owner.getHeight() > 0 ? (this.owner.getHeight() - 2) : 1)*
  • If you don’t notice any change, try a hard refresh in the browser (Ctrl+F5, Shift+F5)

As you can see, just make the shape two pixels smaller (in GD scale), you can modify how much you substract (or add) to delete the inaccuracy, but I tested it with your image and looks good with any object scale :wink:

Thank you very much you resolved my problem :slight_smile:
I’ll add your name in credits in my new awesome game :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: :slight_smile: