pick method

RaycastHit? pick(
  1. Offset point,
  2. Size viewport,
  3. Node root, {
  4. double maxDistance = double.infinity,
})

Picks the nearest scene node under the mouse cursor.

Implementation

RaycastHit? pick(
  Offset point,
  Size viewport,
  Node root, {
  double maxDistance = double.infinity,
}) {
  if (!enabled) return null;
  final ray = screenPointToRay(point, viewport);
  return Raycaster().castNearest(ray, root, maxDistance: maxDistance);
}