physics: not cleaning up properly after removing elements from the scene.
Closed this issue · 0 comments
michaelthatsit commented
calling element.removeChild(entity) can result in a crash. this is due to 2 problems
- some elements do not have physics bodies.
- systems (such as physics) are not being notified about entity removal.
fix: create an entityremoved
event triggered on entity removal, and a corresponding handler in system.