Attempting to extend your Labyrinth demo game to restart the level I added some code to find the ball and remove it from the world object using
function removeBall(world) {
let query = { label: 'ball' };
let ball = world.findOne(query);
world.removeBody(ball);
}
But it just seems to crash. Is this a limitation of the renderer or am I doing something stupid?
Attempting to extend your Labyrinth demo game to restart the level I added some code to find the ball and remove it from the world object using
But it just seems to crash. Is this a limitation of the renderer or am I doing something stupid?