After a mammoth debugging session we now have advanced physics colliding and responding accurately :)

This commit is contained in:
Richard Davey
2013-06-14 15:18:41 +01:00
parent 114d1d2fbf
commit dd8962d4b5
22 changed files with 753 additions and 305 deletions
+8
View File
@@ -16,8 +16,16 @@ module Phaser.Physics.Advanced {
export class ShapeBox extends Phaser.Physics.Advanced.ShapePoly {
// Give in pixels
constructor(x, y, width, height) {
console.log('creating box', x, y, width, height);
x = Manager.pixelsToMeters(x);
y = Manager.pixelsToMeters(y);
width = Manager.pixelsToMeters(width);
height = Manager.pixelsToMeters(height);
var hw = width * 0.5;
var hh = height * 0.5;