INNER CODE UNIT · Rust

skin_width

dust-engine/dust · crates/character/src/lib.rs:244

        let skin_width = move_and_slide.length_unit.0 * config.skin_width;

        // Ground probe: a short downward sweep (`ground_probe` plus the skin
        // width), so any hit is within reach. `MoveHitData` distances are not
        // used: `cast_move` reports the cast's maximum length as
        // `collision_distance`, not the hit's.
        let touching = move_and_slide.cast_move(
            collider,
            start,
            rotation,
            Vec3::NEG_Y * character.ground_probe,
            skin_width,
            &filter,
        );
        let ground = touching.filter(|hit| {
            // A walkable normal is ground. So is a ledge edge under the capsule's
            // rounded bottom, whose contact normal tilts: a ray under the centre
            // finding walkable ground within a step's height keeps the character

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…