We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cb5a8c7 commit 4910f27Copy full SHA for 4910f27
1 file changed
src/physics/p2/World.js
@@ -120,6 +120,15 @@ Phaser.Physics.P2 = function (game, config) {
120
*/
121
this.onEndContact = new Phaser.Signal();
122
123
+ // Pixel to meter function overrides
124
+ if (config.hasOwnProperty('mpx') && config.hasOwnProperty('pxm') && config.hasOwnProperty('mpxi') && config.hasOwnProperty('pxmi'))
125
+ {
126
+ this.mpx = config.mpx;
127
+ this.mpxi = config.mpxi;
128
+ this.pxm = config.pxm;
129
+ this.pxmi = config.pxmi;
130
+ }
131
+
132
// Hook into the World events
133
this.world.on("postStep", this.postStepHandler, this);
134
this.world.on("postBroadphase", this.postBroadphaseHandler, this);
0 commit comments