Jump to content

debug p2js physics


Recommended Posts

when i switch to p2js I can't seem to debug physics at all (I dont see any overlays).


So here is what i am doing



this.pandas = game.add.group(game.world, 'pandas', false, true, Phaser.Physics.P2JS);            this.pandas.createMultiple(28, 'panda');

onupdate at certain intervals I fetch a panda!

var panda = this.pandas.getFirstExists(false);            if (!panda) {                return;            }...panda.reset(x, y);panda.debug = true;


this.pandas.forEachAlive(function(panda) {                game.debug.body(panda);            });
Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...