black_c Posted April 23, 2017 Share Posted April 23, 2017 How to use P2 Physics with each layer object? Code this.saws = this.game.add.group(); this.saws.enableBody = true; this.map.createFromObjects('saws', 4, 'saw', 0, true, false, this.saws); this.saws.forEach(function(saw) { saw.body.clearShapes(); saw.body.loadPolygon('physicsData', 'saw'); }); Quote saw.body.clearShapes is not a function Link to comment Share on other sites More sharing options...
Recommended Posts