pub(super) fn select_interactable(
    client: &Client,
    collect_target: Option<Target<Collectable>>,
    entity_target: Option<Target<Entity>>,
    mine_target: Option<Target<Mine>>,
    viewpoint_entity: Entity,
    scene: &Scene
) -> Option<Interactable>
Expand description

Select interactable to highlight, display interaction text for, and to interact with if the interact key is pressed Selected in the following order:

  1. Targeted items, in order of nearest under cursor: a) entity (if within range) b) collectable c) can be mined, and is a mine sprite (Air) not a weak rock.
  2. outside of targeted cam ray -> closest of nearest interactable entity/block