Fix p2 BodyDebug pixelsPerLengthUnit bug.

When mpx doesn’t return default value, the debug body size and position
goes wrong.
This commit is contained in:
vrecluse 2015-07-31 00:03:18 +08:00
parent f68f25afb2
commit 632c258d8d

View file

@ -30,7 +30,7 @@ Phaser.Physics.P2.BodyDebug = function(game, body, settings) {
* @private
*/
var defaultSettings = {
pixelsPerLengthUnit: 20,
pixelsPerLengthUnit: game.physics.p2.mpx(1),
debugPolygons: false,
lineWidth: 1,
alpha: 0.5