Raycaster.Map.destroy() doesn't work for Arcade and Matter bodies
dreasgrech opened this issue · comments
The Raycaster.Map#destroy
function throws an object is not defined
error:
To Reproduce
After adding objects with mapGameObjects(gameObjects)
, call raycaster.removeMappedObjects(gameObjects);
The fix
phaser-raycaster/src/map/destroy.js
Line 12 in 1d6541e
Change
delete object.raycasterMap;
to delete this.object.raycasterMap;
Opened pull request #40
Thank you for finding the bug and fixing it.
I've added your fix to dev branch and I'll ship it with next release.