Skip to content

Commit b2ca8e1

Browse files
committed
Fixed Composite removal
1 parent dd3db88 commit b2ca8e1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

v3/src/physics/matter-js/World.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ var World = new Class({
115115

116116
MatterEvents.on(this.engine, 'collisionEnd', function (event) {
117117

118-
console.log(event);
119-
120118
localEvents.dispatch(new PhysicsEvent.COLLISION_END(event));
121119

122120
});
@@ -246,7 +244,9 @@ var World = new Class({
246244

247245
remove: function (object, deep)
248246
{
249-
MatterWorld.remove(this.localWorld, object, deep);
247+
var body = (object.body) ? object.body : object;
248+
249+
Composite.removeBody(this.localWorld, body, deep);
250250

251251
return this;
252252
},

0 commit comments

Comments
 (0)