Skip to main content

get_hit_result_on_view_vector

Function get_hit_result_on_view_vector 

Source
pub fn get_hit_result_on_view_vector(
    world: &World,
    source: &dyn Entity,
    distance: f64,
    matching: impl Fn(&dyn Entity) -> bool,
) -> ViewVectorHitResult
Expand description

Vanilla ProjectileUtil.getHitResultOnViewVector.

Casts from the source eye along the look vector for distance blocks using collider shapes, then prefers a matching entity hit over the block hit.