Skip to content

world.removeBody doesn't work #5

@Neutrino-Sunset

Description

@Neutrino-Sunset

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions