Got another odd one. Containers position differently in static/dynamic groups

If I add the images directly to the groups they position the same way. However, adding the containers with the images inside them position differently. Unless I’m missing something obvious, I’d expect the dynamic body and the static body of each image to be positioned the same around each image, no?

create(){
    const graphics = this.make.graphics({});
    graphics.fillStyle(0xFFFFFF);
    graphics.fillRect(0, 0, 20, 20);
    graphics.generateTexture('rect', 20, 20);
    const si = this.make.image({key: 'rect'});
    const sc = this.make.container({x: 100, y: 100});
    sc.add(si);
    const sg = this.physics.add.staticGroup()
    sg.add(sc);
    const di = this.make.image({key: 'rect'});
    const dc = this.make.container({x: 150, y: 100});
    dc.add(di);
    const dg = this.physics.add.group()
    dg.add(dc);
}

const config = {
  type: Phaser.AUTO,
  width: 800,
  height: 500,
  scale: {
    mode: Phaser.Scale.FIT,
    autoCenter: Phaser.Scale.CENTER_BOTH
  },
  physics: {
    default: 'arcade',
    arcade: {
      debug: true,
      debugShowBody: true
    }
  },
  scene: {create};
}

new Phaser.Game(config);

Screenshot?

download

I’m not sure what’s correct but I think you can consistent dimensions by adding .setSize(…) to the containers.

Yea, I use setSize and setPosition to fix it. It’s just odd that the formula to adjust position has to change based on whether it’s a static or dynamic group.