Function find_best_candidate

Source
pub fn find_best_candidate(
    origin: &FocusableArea,
    direction: CompassOctant,
    candidates: &[FocusableArea],
    config: &AutoNavigationConfig,
) -> Option<Entity>
Expand description

Finds the best entity to navigate to from the origin towards the given direction.

For details on what “best” means here, refer to AutoNavigationConfig, which configures how candidates are scored.