Contents

entities(at:)

Finds the collection of entities at the specified point in the scene.

Declaration

@MainActor @preconcurrency func entities(at point: CGPoint) -> [Entity]

Parameters

  • point:

    A point in the view’s coordinate system.

Return Value

An array of entities at point. The array is empty if there are no entities.

Discussion

The method ignores entities that lack a CollisionComponent.

See Also

Finding entities at a point in the view