Function move_and_slide

Source
pub fn move_and_slide<T>(
    world: &T,
    shape: CharacterShape,
    settings: CharacterSettings,
    position: Vec3,
    displacement: Vec3,
    was_grounded: bool,
) -> Result<Motion, CharacterError>
where T: Terrain + ?Sized,
Expand description

Sweep/slide without applying acceleration, gravity or jump state. Displacement may be long; no destination-only collision tests or discrete movement substeps. A bounded starting-overlap recovery is attempted; errors leave caller state intact.