Instance Method

intersects(_:)

Returns a Boolean value that indicates whether this node intersects the specified node.

Declaration

func intersects(_ node: SKNode) -> Bool

Parameters

node

Another node in the same node tree.

Return Value

true if the two nodes intersect; otherwise false.

Discussion

The two nodes are considered to intersect if their frames intersect. The children of both nodes are ignored in this test.