Tufan Posted July 29, 2017 Share Posted July 29, 2017 Sometimes this error occurs after destroying a sprite. Uncaught TypeError: Cannot read property 'GetType' of null at box2d.b2Fixture.GetType (box2d-plugin-full.min.js:9) at box2d.b2ContactFactory.Create (box2d-plugin-full.min.js:9) at box2d.b2ContactManager.AddPair (box2d-plugin-full.min.js:9) at box2d.b2BroadPhase.UpdatePairs (box2d-plugin-full.min.js:9) at box2d.b2ContactManager.FindNewContacts (box2d-plugin-full.min.js:9) at box2d.b2World.Step (box2d-plugin-full.min.js:11) at Phaser.Physics.Box2D.update (box2d-plugin-full.min.js:13) at c.Physics.update (phaser.min.js:3) at c.Game.updateLogic (phaser.min.js:3) at c.Game.update (phaser.min.js:3) $.each(client.entities, function(i,v){ if (v.nametag){ v.nametag.destroy(); } v.destroy(); delete client.entities[i]; }); Should i call body.destroy before? Setting body.removeNextStep to true must delete body correctly but it doesn't trigger an event so i don't know when to delete sprite. Phaser CE v2.7.10 Link to comment Share on other sites More sharing options...
Recommended Posts