Skip to main content

set_world_position

Function set_world_position 

Source
pub fn set_world_position(
    world: &mut World,
    entity: Entity,
    position: Vec3,
) -> bool
Expand description

Changes only local translation to place an entity at a world-space point. Rejects stale/missing transforms and singular/non-finite parent matrices. Dynamic bodies also need their RigidBody.teleport request set before the next physics step; crate::script::Ctx::teleport_of handles this for scripts.