mirror of
https://github.com/wassname/phaser.git
synced 2026-09-12 12:40:47 +08:00
After a mammoth debugging session we now have advanced physics colliding and responding accurately :)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user