P2.BodyDebug circles were drawing at half widths (thanks @enriqueto #1288)

This commit is contained in:
photonstorm 2014-11-08 14:09:26 +00:00
parent a7710c504e
commit 0f3849491d
2 changed files with 2 additions and 1 deletions

View file

@ -138,6 +138,7 @@ Version 2.1.4 - "Bethal" - in development
* Animation.setFrame used the wrong frames array if `useLocalFrameIndex` was `false` and a numeric frame ID was given (thanks @Skeptron #1284) * Animation.setFrame used the wrong frames array if `useLocalFrameIndex` was `false` and a numeric frame ID was given (thanks @Skeptron #1284)
* Fullscreen mode in IE11 now works (thanks @pnstickne) * Fullscreen mode in IE11 now works (thanks @pnstickne)
* Cache.addBitmapData now auto-creates a FrameData (thanks @pnstickne #1294 #1300) * Cache.addBitmapData now auto-creates a FrameData (thanks @pnstickne #1294 #1300)
* P2.BodyDebug circles were drawing at half widths (thanks @enriqueto #1288)
For details about changes made in previous versions of Phaser see the full Change Log at https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md For details about changes made in previous versions of Phaser see the full Change Log at https://github.com/photonstorm/phaser/blob/master/CHANGELOG.md

View file

@ -181,7 +181,7 @@ Phaser.Utils.extend(Phaser.Physics.P2.BodyDebug.prototype, {
if (typeof color === 'undefined') { color = 0xffffff; } if (typeof color === 'undefined') { color = 0xffffff; }
g.lineStyle(lineWidth, 0x000000, 1); g.lineStyle(lineWidth, 0x000000, 1);
g.beginFill(color, 1.0); g.beginFill(color, 1.0);
g.drawCircle(x, y, -radius); g.drawCircle(x, y, -radius*2);
g.endFill(); g.endFill();
g.moveTo(x, y); g.moveTo(x, y);
g.lineTo(x + radius * Math.cos(-angle), y + radius * Math.sin(-angle)); g.lineTo(x + radius * Math.cos(-angle), y + radius * Math.sin(-angle));