Function pick

Source
pub fn pick(
    look_direction: &LookDirection,
    eye_position: &Vec3,
    chunks: &ChunkStorage,
    pick_range: f64,
) -> HitResult
Expand description

Get the block or entity that a player would be looking at if their eyes were at the given direction and position.

If you need to get the block/entity the player is looking at right now, use HitResultComponent.

Also see pick_block.

TODO: does not currently check for entities