Contents

entities(at:in:)

Finds all the hit entities when projecting a ray from a starting point.

Declaration

func entities(at point: CGPoint, in space: some CoordinateSpaceProtocol) -> [Entity]

Parameters

  • point:

    A point in the provided coordinate space.

  • space:

    The 2D coordinate space in which to interpret the point.

Return Value

A list of entities at point. Returns an empty array if no entities were found.

Discussion