From b7beea1d376071fa2753961934b74da826fd8565 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Wed, 14 Feb 2018 19:34:21 +0000 Subject: [PATCH] Impact bodies now remove themselves from the world when destroyed. --- src/physics/impact/Body.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/physics/impact/Body.js b/src/physics/impact/Body.js index b77d6c3fe..efdfaa389 100644 --- a/src/physics/impact/Body.js +++ b/src/physics/impact/Body.js @@ -572,6 +572,8 @@ var Body = new Class({ */ destroy: function () { + this.world.remove(this); + this.enabled = false; this.world = null;