Skip to main content

cast_capsule

Function cast_capsule 

pub fn cast_capsule<const MAX_LEAVES: usize>(
    bvh: &BroadphaseBvh<MAX_LEAVES>,
    shapes: &[ColliderShape3D],
    motors: &[Motor],
    center: [f32; 3],
    radius: f32,
    half_height: f32,
    dir: [f32; 3],
    max_dist: f32,
    ignore_collider: Option<u32>,
) -> Option<ShapeCastHit3D>
Expand description

Casts a vertical 3D capsule (radius, half_height) along dir up to max_dist by sweeping 3 axial proxy spheres (bottom hemisphere, center, top hemisphere).