Contents

body(in:)

Searches for the first physics body that intersects the specified rectangle.

Declaration

func body(in rect: CGRect) -> SKPhysicsBody?

Parameters

  • rect:

    A rectangle in scene coordinates.

Mentioned in

Return Value

The first physics body discovered that intersects the rectangle. If no body intersects the rectangle, this method returns nil.

See Also

Searching the Scene for Physics Bodies