wiserim / phaser-raycaster

Raycasting plugin for Phaser 3. Documentation:

Home Page:https://wiserim.github.io/phaser-raycaster/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

image

To Reproduce
After adding objects with mapGameObjects(gameObjects), call raycaster.removeMappedObjects(gameObjects);

The fix

delete object.raycasterMap;

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.

Version 0.10.7 has been released.
Pull request: #42