Skip to main content

set_parent

Function set_parent 

Source
pub fn set_parent(
    world: &mut World,
    child: Entity,
    parent: Option<Entity>,
) -> bool
Expand description

Reparents while keeping the world pose when it is representable as TRS. Returns false without mutation for dead handles, cycles, non-finite matrices or a singular parent. Shear introduced by a rotated non-uniformly scaled parent is rejected because Transform cannot represent it exactly.