Contents

enumerateBodies(at:using:)

Enumerates all the physics bodies in the scene that contain a point.

Declaration

func enumerateBodies(at point: CGPoint, using block: @escaping (SKPhysicsBody, UnsafeMutablePointer<ObjCBool>) -> Void)

Parameters

  • point:

    A point in scene coordinates.

  • block:

    A block to be called for each physics body that contains the point. The block takes the following parameters:

    body

    The physics body that the ray intersected.

    stop

    A pointer to a Boolean variable. Your block can set this to True to terminate the enumeration.

See Also

Searching the Scene for Physics Bodies