Body:detach_from_parent

Unlinks this entity from any parent it was attached to. This breaks the relationship created by attach_to.

Usage

body:detach_from_parent()

Examples

local ecs = crystal.ECS:new();
ecs:add_system(crystal.PhysicsSystem);

local hero = ecs:spawn(crystal.Entity);
hero:add_component(crystal.Body);

local backpack = ecs:spawn(crystal.Entity);
backpack:add_component(crystal.Body);
backpack:attach_to(hero);
backpack:detach_from_parent();

This site uses Just the Docs, a documentation theme for Jekyll.