diff --git a/src/entity/entity.js b/src/entity/entity.js index b9a410f29b..b61fbfe9ea 100644 --- a/src/entity/entity.js +++ b/src/entity/entity.js @@ -1470,6 +1470,8 @@ this.onCollision(res, obj); // return the type res.type = this.type; + // return a reference of the colliding object + res.obj = this; return res; } return null;