Hi,
Completely new to Phaser but love it. I've purchased and am using the Box2D plugin and have a simple question about the coordinate system.
If I create a new game with dimensions width 800 and height 600 like so:
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'phaser-example', {preload: preload, create: create, update: update, render: render});
With the following pixels to meter setting:
game.physics.box2d.ptmRatio = 100;
and create a new Box2D body with a 40 x 20 pixel rectangle fixture (centred on the body) like so:
var rect = new Phaser.Physics.Box2D.Body(this.game, null, 400, 0);
rect.static = true;
rect.addRectangle(40, 20, 20, 10);
See the image below: Why is the rectangle not positioned 400 pixels from the left? It looks like it's positioned 200 pixels from the left instead. Is there some scale factor I'm missing here? This is happening on my Retina MacBook Pro and on an external 1920 screen (not Retina).
Many thanks in advance,